[Bf-committers] makesdna.c 64 bit alignment detection bug reminder

Ton Roosendaal ton at blender.org
Mon Apr 9 18:00:56 CEST 2007

Hi Alfredo,

Sorry for slow reply, the 64 bit topic was on my agenda for april, so I  
waited with looking at this. :)

I will fix the errors as you reported. But, next time you notice them,  
feel free to fix it (if fix is obvious), or just kick the developer via  
this mailing list.


On 19 Mar, 2007, at 6:15, Alfredo de Greef wrote:

> Hi,
> A year ago, when I was still working on the yafray
> export code, I encountered a problem that turned out
> to be a 64 bit related problem, since I use 64 bit
> linux.
> It was hard to track down but eventually I found the
> problem, it was the sdna test code, it doesn't always
> detect alignment issues.
> See thread here:
> http://projects.blender.org/pipermail/bf-committers/2006-May/ 
> 014757.html
> and my commit:
> http://projects.blender.org/pipermail/bf-blender-cvs/2006-June/ 
> 006762.html
> I had mailed Ton about this, tried to remind him a few
> times, even sent a modified makesdna.c, but he is
> probably too busy to remember all this, so I thought
> I'd post it here so others can remind him as well ;)
> Reason I post this now is that I just compiled Blender
> again and just for 'fun' I thought I'd try my patched
> makesdna.c again to see if there are still any
> problems in sdna.
> And I did find two alignement issues, IDPropertyData
> struct as used in IDProperty in DNA_ID.h, and the
> placement of ImagePaintSettings struct in ToolSettings
> in DNA_scene_types.h.
> Since I don't know if I'm allowed to make changes in
> that area, I didn't commit the required changes (just
> some extra padding), but should be easy enough to do
> for anyone who has 'clearance' :)
> The problem in makesdna is that it doesn't always seem
> to detect correct alignment of 'embedded' structs,
> structs in structs, my makesdna.c explicitly goes
> through all structs, checking each recursively for
> alignment at every variable.
> According to Ton, makesdna.c is already supposed to do
> something similar to this, so my modifcations were
> probably a bit overkill, but obviously it has an as of
> yet undetected bug somewhere...
> This is not the definitive answer to all 64 bit issues
> of course, but might be useful info.
> apologies for the overly verbose post as always...
> Alfredo
> _______________________________________________________________________ 
> _____________
> The fish are biting.
> Get more visitors on your site using Yahoo! Search Marketing.
> http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-committers
Ton Roosendaal  Blender Foundation ton at blender.org  

More information about the Bf-committers mailing list