Closed
Bug 528351
Opened 15 years ago
Closed 14 years ago
libffi_msvc doesn't deal with returning structs by value
Categories
(Core :: js-ctypes, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: dwitte, Assigned: dwitte)
References
Details
js/ctypes/libffi_msvc/win32.c and win64.asm don't implement the entire MSVC ABI. For one, they can't return structs by value. They may also be missing other bits, but I'm not sure. There have been many updates to libffi's win32 code since libffi_msvc was forked from it in 2003, of which the return-struct-by-value bits was one. We should trawl over them and pick out the relevant bits. Or just re-translate wholesale the gas asm into MSVC asm, as was done originally. (If we can get the libffi build system to work with MSVC, we could maintain this fork inside libffi itself, and have less work to do.) Until then, I'll have ctypes throw an error when attempting to return a struct by value on MSVC builds. And make sure that the unit tests carefully exercise the important ABI bits that are supported. Relevant newsgroup thread, bug, and patch: http://old.nabble.com/-PATCH--Fix-Cygwin-bootstrap,-PR40807-and-all-significant-FAILs-on--win32.-td24612995.html http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40807 http://gcc.gnu.org/viewcvs/trunk/libffi/src/x86/win32.S?r1=150042&r2=150041&pathrev=150042
Assignee | ||
Comment 1•14 years ago
|
||
Fixed per bug 538216.
Assignee: nobody → dwitte
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•