[Python-Dev] GC head alignment issue (original) (raw)
Guido van Rossum guido@python.org
Thu, 11 Oct 2001 10:08:32 -0400
- Previous message: [Python-Dev] Bug or feature? Unicode vs t#
- Next message: [Python-Dev] GC head alignment issue
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
See this bug report:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=467145&group_id=5470
The GC header adds 12 bytes to the start of the object, but for objects (like complex) that contain a double and require double alignment, that messes up the alignment. Something needs to be done about this: I'm guessing a configuration test for the required alignment of double, and a rounding up of the GC head size to a multiple of that. Should affect only the AS_GC and FROM_GC macros in gcmodule.c and the two uses of sizeof(PyGC_Head) there -- unless you can figure out a way to add a pad field to the GC head only when needed, then a change to objimpl.h might be sufficient.
So far this only affects HP hardware, but we can't trust that!
(It hasn't affected 2.0 or 2.1 because it only breaks when I subclass complex.)
--Guido van Rossum (home page: http://www.python.org/~guido/)
- Previous message: [Python-Dev] Bug or feature? Unicode vs t#
- Next message: [Python-Dev] GC head alignment issue
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]