Port-powerpc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: devel/libffi

I've looked into these failures a bit. Four of the five failures are
for the same basic test case (testing different sets of compiler
flags), found in testsuite/libffi.call/cls_6byte.c, which tests
args and return values which are 6-byte-long structs. It turns out
that, for functions returning structs that are between 4 and 8 bytes
in size, ffi_call() will write a little past the end of the passed-in
return value buffer. In this case, it stomps on the first two bytes of
a local variable in main(), causing the test to deviate from its
expected behavior.

(Actually, looking at powerpc/sysv.S, the same thing may happen for
structs shorter than 4 bytes as well.)

I guess I'll write this up in a little more detail and send it to the
libffi developers.

   Wim Lewis <wiml%hhhh.org@localhost>, Seattle, WA, USA. PGP keyID 27F772C1

Home | Main Index | Thread Index | Old Index