[jamming] FT Jam 2.5.3 second release candidate (fix GCC 4.2 crashes)

David Turner david at freetype.org
Tue Jun 19 03:26:11 PDT 2007


Hello Ingo,

a stripped version of the diff between rc1 and rc2 is attached, containing only the changes
related to the aliasing issues. I have no idea if this patch applies to classic Jam though,
let me know if you try this.

the problem was in the implementation of Jam's hash tables. A single function called
"hashitem" that takes a void** parameter was the culprit. the parameter was typically
the address of a "key" structure, but casting a dereferenced void** is no longer kosher
with GCC 4.2 due to its more aggressive alisaing optimizations.

I replaced the single hashitem() function by two distinct ones (hashget() and hashput())
who avoid the problem completely by using a different way to pass key parameters. this
required changing all clients of the hash table interface. Fortunately, there aren't that
many in the code.

Hope this helps,

- David

On Tue, 19 Jun 2007 11:17:32 +0200, "Ingo Weinhold" <bonefish at cs.tu-berlin.de> said:
> 
> On 2007-06-10 at 19:27:08 [+0200], David Turner <david at freetype.org>
> wrote:
> [...]
> > PS: I don't have aliasing fixes for classic Jam 2.5 yet, my time is limited 
> > but
> >     if you're interested in back-porting the fix, I can send you a patch 
> >     file
> >     that already contains most of what you need (but probably requires a 
> >     bit of
> >     hand fiddling)
> 
> Can you post the patch please, or at least explain, what the problem is.
> 
> CU, Ingo
> _______________________________________________
> jamming mailing list  -  jamming at perforce.com
> http://maillist.perforce.com/mailman/listinfo/jamming
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ftjam-2.5.3-aliasing.patch
Type: text/x-patch
Size: 11533 bytes
Desc: not available
Url : http://maillist.perforce.com/pipermail/jamming/attachments/20070619/b4599484/ftjam-2.5.3-aliasing.bin


More information about the jamming mailing list