[Bf-committers] 64-bit bug loading .blend files containing scriptlinks

Ken Hughes khughes at pacific.edu
Fri Nov 18 23:48:23 CET 2005


This is the first real 64-bit bug I've seen (which is good).  A .blend 
file from a 32-bit system which contains three scriptlinks is loaded on 
my AMD64 system under linux.  As read_struct() load the file, it gets to 
the structure for the scriptlinks and allocates memory for 3 pointers 
for a total of 12 bytes.  Later, when lib_link_scriptlink() is called, 
it goes through trying to relink the objects, but thinks slink->scripts 
is pointer at 8-byte pointers.  The result is memory errors on exit 
(either from MEM_freen() or glibc).  For now I've verified using a hack 
in lib_link_scriptlink() that correctly converting the 32-bit pointers 
to 64-bit pointers and reallocating the proper storage fixes the problem.

Any suggestions what to do?  I'm not familiar with this part of the 
source tree at all.

Ken


More information about the Bf-committers mailing list