[Issue 231] long is 4-byte aligned in unittest with 4 character module name

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jun 29 11:38:28 PDT 2006


http://d.puremagic.com/issues/show_bug.cgi?id=231





------- Comment #2 from sean at f4.ca  2006-06-29 13:38 -------
One last update.  I just noticed that the static data segment is actually
different sizes for the two modules tested above.  The data segment for 161x is
68 bytes and is 72 bytes for 161_1.  It also seems weird that the size of a
module name should affect the stack location of a variable used in a unit test.
 In any case, here are the two data segments.  Notice the additional padding
before __ModuleInfo_5161_1 in the latter case:

168x:

_DATA   segment
        db      025h,070h,020h,025h,025h,020h,025h,075h
        db      020h,03dh,020h,025h,075h,00ah,000h,031h
        db      036h,031h,078h,000h
__ModuleInfo_4161x:
        db      000h,000h,000h,000h
        db      000h,000h,000h,000h,004h,000h,000h,000h
        dd      offset FLAT:_DATA[0Fh]
        db      000h,000h,000h,000h
        dd      offset FLAT:__ModuleInfo_4161x[030h]
        db      000h,000h,000h,000h
        db      000h,000h,000h,000h,000h,000h,000h,000h
        db      000h,000h,000h,000h,000h,000h,000h,000h
        dd      offset FLAT:__modtest_4161x
_DATA   ends

161_1:

_DATA   segment
        db      025h,070h,020h,025h,025h,020h,025h,075h
        db      020h,03dh,020h,025h,075h,00ah,000h,031h
        db      036h,031h,05fh,031h,000h,000h,000h,000h
__ModuleInfo_5161_1:
        db      000h,000h,000h,000h,000h,000h,000h,000h
        db      005h,000h,000h,000h
        dd      offset FLAT:_DATA[0Fh]
        db      000h,000h,000h,000h
        dd      offset FLAT:__ModuleInfo_5161_1[030h]
        db      000h,000h,000h,000h,000h,000h,000h,000h
        db      000h,000h,000h,000h,000h,000h,000h,000h
        db      000h,000h,000h,000h
        dd      offset FLAT:__modtest_5161_1
_DATA   ends


-- 




More information about the Digitalmars-d-bugs mailing list