freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft] Optimizer problem? (FT2.3.7 + GCC4.2.3)


From: Ian Britten
Subject: Re: [ft] Optimizer problem? (FT2.3.7 + GCC4.2.3)
Date: Wed, 23 Jul 2008 11:04:59 -0300
User-agent: Thunderbird 2.0.0.12 (X11/20080305)

Ian Britten wrote:

Ok, I think I might have something that I can hand off...
[ Again, I'm using GCC 4.2.3, which is the version that came
preinstalled with this distribution.  I haven't had a chance to
try any other version(s) ]

I built a stand-alone debug version of FT+ft2demos, and when I
run:
      ./ftview 10 /usr/share/fonts/TTF/Vera.ttf
it runs without any problems.

I built a stand-alone optimized (-O3) version of FT+ft2demos,
and  when I run:
      ./ftview 10 /usr/share/fonts/TTF/Vera.ttf
it crashes.

Unfortunately, I don't have any details yet, so I'm not sure if
this is the same problem I'm encountering, or something different.

Ok, I've got some details here:
[ FYI - You can debug 'ftview' by running '.libs/lt-ftview' instead ]

I built 4 versions of ft2demos, solely varying the optimization
option (Everything else was default).  Here's the results:
  -g   -> Works fine, no crash, no Valgrind errors
  -O   -> Works fine, no crash, no Valgrind errors
  -O2  -> Crashes - See attached ft_O2.txt Valgrind log
  -O3  -> Crashes - See attached ft_O3.txt Valgrind log

At this point, I'm becoming convinced that there is a problem with
this FT/GCC combo when using high optimization (Only on 32-bit though),
but I'm unsure whether the problem is with FT or GCC.
I'm not sure I can pursue it much further from here, but if there is
anything I can try that'd help you out, please let me know!

Ian

% valgrind .libs/lt-ftview 10 /usr/share/fonts/TTF/Vera.ttf
  Memcheck, a memory error detector.
  Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
  Using LibVEX rev 1804, a library for dynamic binary translation.
  Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
  Using valgrind-3.3.0, a dynamic binary instrumentation framework.
  Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
  For more details, rerun with: -v
  
  Use of uninitialised value of size 4
     at 0x40778B1: FTC_Manager_LookupFace (in 
/tmp/ft/optO2/freetype-2.3.7/objs/.libs/libfreetype.so.6.3.18)
     by 0x40778ED: ftc_basic_family_get_count (in 
/tmp/ft/optO2/freetype-2.3.7/objs/.libs/libfreetype.so.6.3.18)
     by 0x4077CE6: ftc_snode_new (in 
/tmp/ft/optO2/freetype-2.3.7/objs/.libs/libfreetype.so.6.3.18)
     by 0x4078733: FTC_Cache_NewNode (in 
/tmp/ft/optO2/freetype-2.3.7/objs/.libs/libfreetype.so.6.3.18)
     by 0x4078A5B: FTC_SBitCache_LookupScaler (in 
/tmp/ft/optO2/freetype-2.3.7/objs/.libs/libfreetype.so.6.3.18)
     by 0x804D0C3: FTDemo_Index_To_Bitmap (in 
/tmp/ft/optO2/ft2demos-2.3.7/bin/.libs/lt-ftview)
     by 0x804D2DD: FTDemo_Draw_Index (in 
/tmp/ft/optO2/ft2demos-2.3.7/bin/.libs/lt-ftview)
     by 0x804B049: main (in /tmp/ft/optO2/ft2demos-2.3.7/bin/.libs/lt-ftview)
  
  Use of uninitialised value of size 4
     at 0x40779E8: FTC_Manager_LookupSize (in 
/tmp/ft/optO2/freetype-2.3.7/objs/.libs/libfreetype.so.6.3.18)
     by 0x4077DC5: ftc_basic_family_load_bitmap (in 
/tmp/ft/optO2/freetype-2.3.7/objs/.libs/libfreetype.so.6.3.18)
     by 0x4077B1D: ftc_snode_load (in 
/tmp/ft/optO2/freetype-2.3.7/objs/.libs/libfreetype.so.6.3.18)
     by 0x4077D67: ftc_snode_new (in 
/tmp/ft/optO2/freetype-2.3.7/objs/.libs/libfreetype.so.6.3.18)
     by 0x4078733: FTC_Cache_NewNode (in 
/tmp/ft/optO2/freetype-2.3.7/objs/.libs/libfreetype.so.6.3.18)
     by 0x4078A5B: FTC_SBitCache_LookupScaler (in 
/tmp/ft/optO2/freetype-2.3.7/objs/.libs/libfreetype.so.6.3.18)
     by 0x804D0C3: FTDemo_Index_To_Bitmap (in 
/tmp/ft/optO2/ft2demos-2.3.7/bin/.libs/lt-ftview)
     by 0x804D2DD: FTDemo_Draw_Index (in 
/tmp/ft/optO2/ft2demos-2.3.7/bin/.libs/lt-ftview)
     by 0x804B049: main (in /tmp/ft/optO2/ft2demos-2.3.7/bin/.libs/lt-ftview)
  
  Invalid read of size 4
     at 0x4077DDA: ftc_basic_family_load_bitmap (in 
/tmp/ft/optO2/freetype-2.3.7/objs/.libs/libfreetype.so.6.3.18)
     by 0x4077B1D: ftc_snode_load (in 
/tmp/ft/optO2/freetype-2.3.7/objs/.libs/libfreetype.so.6.3.18)
     by 0x4077D67: ftc_snode_new (in 
/tmp/ft/optO2/freetype-2.3.7/objs/.libs/libfreetype.so.6.3.18)
     by 0x4078733: FTC_Cache_NewNode (in 
/tmp/ft/optO2/freetype-2.3.7/objs/.libs/libfreetype.so.6.3.18)
     by 0x4078A5B: FTC_SBitCache_LookupScaler (in 
/tmp/ft/optO2/freetype-2.3.7/objs/.libs/libfreetype.so.6.3.18)
     by 0x804D0C3: FTDemo_Index_To_Bitmap (in 
/tmp/ft/optO2/ft2demos-2.3.7/bin/.libs/lt-ftview)
     by 0x804D2DD: FTDemo_Draw_Index (in 
/tmp/ft/optO2/ft2demos-2.3.7/bin/.libs/lt-ftview)
     by 0x804B049: main (in /tmp/ft/optO2/ft2demos-2.3.7/bin/.libs/lt-ftview)
   Address 0xec835657 is not stack'd, malloc'd or (recently) free'd
  
  Process terminating with default action of signal 11 (SIGSEGV)
   Access not within mapped region at address 0xEC835657
     at 0x4077DDA: ftc_basic_family_load_bitmap (in 
/tmp/ft/optO2/freetype-2.3.7/objs/.libs/libfreetype.so.6.3.18)
     by 0x4077B1D: ftc_snode_load (in 
/tmp/ft/optO2/freetype-2.3.7/objs/.libs/libfreetype.so.6.3.18)
     by 0x4077D67: ftc_snode_new (in 
/tmp/ft/optO2/freetype-2.3.7/objs/.libs/libfreetype.so.6.3.18)
     by 0x4078733: FTC_Cache_NewNode (in 
/tmp/ft/optO2/freetype-2.3.7/objs/.libs/libfreetype.so.6.3.18)
     by 0x4078A5B: FTC_SBitCache_LookupScaler (in 
/tmp/ft/optO2/freetype-2.3.7/objs/.libs/libfreetype.so.6.3.18)
     by 0x804D0C3: FTDemo_Index_To_Bitmap (in 
/tmp/ft/optO2/ft2demos-2.3.7/bin/.libs/lt-ftview)
     by 0x804D2DD: FTDemo_Draw_Index (in 
/tmp/ft/optO2/ft2demos-2.3.7/bin/.libs/lt-ftview)
     by 0x804B049: main (in /tmp/ft/optO2/ft2demos-2.3.7/bin/.libs/lt-ftview)
  
% valgrind .libs/lt-ftview 10 /usr/share/fonts/TTF/Vera.ttf
  Memcheck, a memory error detector.
  Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
  Using LibVEX rev 1804, a library for dynamic binary translation.
  Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
  Using valgrind-3.3.0, a dynamic binary instrumentation framework.
  Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
  For more details, rerun with: -v

  Use of uninitialised value of size 4
     at 0x4086CA1: FTC_Manager_LookupFace (in 
/tmp/ft/optO3/freetype-2.3.7/objs/.libs/libfreetype.so.6.3.18)
     by 0x4086CDD: ftc_basic_family_get_count (in 
/tmp/ft/optO3/freetype-2.3.7/objs/.libs/libfreetype.so.6.3.18)
     by 0x4089916: ftc_snode_new (in 
/tmp/ft/optO3/freetype-2.3.7/objs/.libs/libfreetype.so.6.3.18)
     by 0x4087C96: FTC_Cache_NewNode (in 
/tmp/ft/optO3/freetype-2.3.7/objs/.libs/libfreetype.so.6.3.18)
     by 0x4088544: FTC_SBitCache_LookupScaler (in 
/tmp/ft/optO3/freetype-2.3.7/objs/.libs/libfreetype.so.6.3.18)
     by 0x804D1F3: FTDemo_Index_To_Bitmap (in 
/tmp/ft/optO3/ft2demos-2.3.7/bin/.libs/lt-ftview)
     by 0x804D40D: FTDemo_Draw_Index (in 
/tmp/ft/optO3/ft2demos-2.3.7/bin/.libs/lt-ftview)
     by 0x804B069: main (in /tmp/ft/optO3/ft2demos-2.3.7/bin/.libs/lt-ftview)
  
  Use of uninitialised value of size 4
     at 0x4086CE7: ftc_basic_family_get_count (in 
/tmp/ft/optO3/freetype-2.3.7/objs/.libs/libfreetype.so.6.3.18)
     by 0x4089916: ftc_snode_new (in 
/tmp/ft/optO3/freetype-2.3.7/objs/.libs/libfreetype.so.6.3.18)
     by 0x4087C96: FTC_Cache_NewNode (in 
/tmp/ft/optO3/freetype-2.3.7/objs/.libs/libfreetype.so.6.3.18)
     by 0x4088544: FTC_SBitCache_LookupScaler (in 
/tmp/ft/optO3/freetype-2.3.7/objs/.libs/libfreetype.so.6.3.18)
     by 0x804D1F3: FTDemo_Index_To_Bitmap (in 
/tmp/ft/optO3/ft2demos-2.3.7/bin/.libs/lt-ftview)
     by 0x804D40D: FTDemo_Draw_Index (in 
/tmp/ft/optO3/ft2demos-2.3.7/bin/.libs/lt-ftview)
     by 0x804B069: main (in /tmp/ft/optO3/ft2demos-2.3.7/bin/.libs/lt-ftview)
   Address 0x6f4c5f75 is not stack'd, malloc'd or (recently) free'd
  
  Process terminating with default action of signal 11 (SIGSEGV)
   Access not within mapped region at address 0x6F4C5F75
     at 0x4086CE7: ftc_basic_family_get_count (in 
/tmp/ft/optO3/freetype-2.3.7/objs/.libs/libfreetype.so.6.3.18)
     by 0x4089916: ftc_snode_new (in 
/tmp/ft/optO3/freetype-2.3.7/objs/.libs/libfreetype.so.6.3.18)
     by 0x4087C96: FTC_Cache_NewNode (in 
/tmp/ft/optO3/freetype-2.3.7/objs/.libs/libfreetype.so.6.3.18)
     by 0x4088544: FTC_SBitCache_LookupScaler (in 
/tmp/ft/optO3/freetype-2.3.7/objs/.libs/libfreetype.so.6.3.18)
     by 0x804D1F3: FTDemo_Index_To_Bitmap (in 
/tmp/ft/optO3/ft2demos-2.3.7/bin/.libs/lt-ftview)
     by 0x804D40D: FTDemo_Draw_Index (in 
/tmp/ft/optO3/ft2demos-2.3.7/bin/.libs/lt-ftview)
     by 0x804B069: main (in /tmp/ft/optO3/ft2demos-2.3.7/bin/.libs/lt-ftview)
  

reply via email to

[Prev in Thread] Current Thread [Next in Thread]