bugThe FreeType Project - Bugs: bug #26849, navit crashes in freetype unless...

 
 
Show feedback again

bug #26849: navit crashes in freetype unless freetype built with -fno-strict-aliasing

Submitted by:  Adam Williamson <adamwill>
Submitted on:  Fri 19 Jun 2009 10:39:10 PM UTC  
 
Severity: 3 - NormalItem Group: Hack required
Status: FixedPrivacy: Public
Assigned to: Werner LEMBERG <wl>Open/Closed: Closed
Planned Release: 2.3.10

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Wed 29 Jul 2009 06:41:38 PM UTC, comment #9:

Confirming that the fix works in my situation. I applied the patch against 2.3.9 and rebuilt it (since that's an easier, smaller change to the spec file than doing a git build); navit now runs OK. thanks for the fix.

Adam Williamson <adamwill>
Wed 29 Jul 2009 05:28:30 PM UTC, comment #8:

Oops! Now pushed. Sorry.

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Wed 29 Jul 2009 04:38:10 PM UTC, comment #7:

I had a look in git - both in cgit, and by checking out a local copy - and the patch doesn't appear to have been applied. src/cache/ftccache.h was last modified on May 16th, and the code in the file appears to be the 'before' state of the RH bug patch.

Adam Williamson <adamwill>
Wed 29 Jul 2009 09:52:07 AM UTC, comment #6:

I think this is fixed now in the git repository. Please test.

The patch is from

https://bugzilla.redhat.com/show_bug.cgi?id=513582

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Sat 20 Jun 2009 07:25:10 AM UTC, comment #5:

I can give you a shell on my system if it would help. Martin Schaller is cp15 on freenode IRC, he could probably discuss the details with you better than I can. I'm not a coder.

Adam Williamson <adamwill>
Sat 20 Jun 2009 05:46:26 AM UTC, comment #4:

Mhmm. I forgot bug report #25479. It's probably indeed a FreeType problem -- maybe this other report helps in identifying the problem and finding a patch. IIRC, I was never able to reproduce the crash on my GNU/Linux box, making it quite hard to find a solution.

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Sat 20 Jun 2009 05:38:18 AM UTC, comment #3:

To be clear: freetype builds fine. That's not the issue. The issue is that navit (another application) crashes on an operation involving freetype, unless you rebuild freetype with -fno-strict-aliasing . We're not sure if this is really a bug in freetype or in GCC, though.

Adam Williamson <adamwill>
Sat 20 Jun 2009 05:37:03 AM UTC, comment #2:

I'm not sure if there's any compiler warnings in the first place. Compiler warnings aren't the problem, the problem is the crashing. It's the crashing I don't want. :)

We're using GCC 4.4 in Fedora. Haven't checked latest git freetype, I'll try that.

Adam Williamson <adamwill>
Sat 20 Jun 2009 04:48:39 AM UTC, comment #1:

I'm not sure that it is a bug in FreeType. Compiling with `-O3 -Wall -W' doesn't give a single warning (I know, this isn't reliable, but...); using -O2 doesn't give a warning either. This is with gcc 4.3.2.

I don't use Fedora so it's difficult for me to test this issue `live'. Are there any remaining compiler warnings if you use the current git version of FreeType? Have you tried a different compiler version? What does valgrind say?

Ideally, a compiler guy should check the issue.

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Fri 19 Jun 2009 10:39:10 PM UTC, original submission:

I've reported this issue downstream in Fedora, but I think it's worth bringing to the attention of upstream as well.

https://bugzilla.redhat.com/show_bug.cgi?id=506840

I encountered a problem running SVN navit (a GPS navigation app) on F11 and then Rawhide; it would crash as soon as it tried to render any text.

I reported this upstream, and the upstream developer Martin Schaller very kindly investigated this extensively. He was able to isolate it to a problem in freetype. I quote:

"I think I got something
<cp15> Can you find out what compiler flags are used to compile freetype on redhat?
<cp15> Because it seems freetype exibits a bug when compiled without -fno-strict-aliasing
...
<adamw> OK...so this is really a bug in freetype we should report and get fixed, building with -fno-strict-aliasing is just a workaround, right?
<cp15> Well... Hmm... without -fno-strict-aliasing gcc makes some optimizations which are probably not expected by freetype. Hard to say where the bug is
<adamw> yes! that does the trick indeed
ok, so...file a bug on freetype. can you give me some more details to include?
do you know exactly where it goes wrong?
<cp15> I can only tell that it crashes in ftccmap.c line 382 at FT_ASSERT((FT_UInt)( char_code - node->first ) < FTC_CMAP_INDICES_MAX ); because node seems to be corrupted or NULL or at line cmap = face->charmaps[cmap_index];
because face->charmaps seems to be corrupted
Should have been line 406 in the second part"

So, that's what we know about the problem. Please ask if you need any more details. A .src.rpm for navit which you can rebuild to reproduce the problem can be found at
http://adamwill.fedorapeople.org/navit/navit-0.1.1-0.1.2347.aw_fc12.src.rpm . Run it with a stock Fedora freetype, and it fails. Run it with stock Rawhide freetype unchanged except by adding -fno-strict-aliasing to CFLAGS, and it
works.

Adam Williamson <adamwill>

 

(Note: upload size limit is set to 512 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by wl (Posted a comment)
  • -unavailable- added by adamwill (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 29 Jul 2009 09:52:07 AM UTCwlStatusNeed Info=>Fixed
      Open/ClosedOpen=>Closed
      Planned ReleaseNone=>2.3.10
    Sat 20 Jun 2009 04:48:39 AM UTCwlStatusNone=>Need Info
      Assigned toNone=>wl
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup