From: jeroen <je...@fo...> - 2002-12-28 23:04:43
|
On Saturday 28 December 2002 12:09 pm, Lyle Johnson wrote: > jeroen wrote: > > Which statement exactly is it dying at? You're sure its no gcc/powerpc > > idiosyncracy of some kind, e.g. compiler bug? > > Now I'm starting to suspect the latter (ugh). I knew that it was > crashing in the __FXMETACLASSINITIALIZER__ struct's constructor, but > after adding more debugging statements it turned out that the > problematic lines were the calls to fxcalloc() and fxfree() [by way of > the FXCALLOC and FXFREE macros]. For example, if I simply replace lines > like this: > > FXCALLOC(&metaClassTable,FXMetaClass*,nmetaClassTable); > > with this: > > metaClassTable=(const FXMetaClass**)calloc(nmetaClassTable, > sizeof(FXMetaClass*)); > > and a similar change for the FXFREE line, the library loads OK. > > Very disturbing. That's as far as I got before taking a break last night. Perhaps there is some issue with compiling for position independent code, or using -rdynamic or something like that? fxcalloc() basically just calls calloc(), but resolving to fxcalloc() may work differently than resolving to calloc() during load-time. - Jeroen -- +----------------------------------------------------------------------------+ | Copyright (C) 15:50 12/28/2002 Jeroen van der Zijp. All Rights Reserved. | +----------------------------------------------------------------------------+ |