[Bug 2953] Java 1.4.x dies running even trivial programs ("Truncated class file")
http://bugs.winehq.org/show_bug.cgi?id=2953 ------- Additional Comments From damjan.jov(a)gmail.com 2007-03-02 04:30 ------- Created an attachment (id=4757) --> (http://bugs.winehq.org/attachment.cgi?id=4757&action=view) patch aligning st_size on the proper 24 byte offset Ok you have no idea how long it took me to figure this out... In struct _stati64, the st_size field lies 24 bytes from the beginning of the struct in Windows, but only 20 bytes in wine. Why this is, I don't know - but the 24 bytes would be the beginning of an 8 byte boundary and maybe Windows aligns all 64 bit integers on 8 byte boundaries. mingw uses the right offset, even though the struct declaration in mingw and wine appear identical. The only difference is the gcc version - mingw uses gcc 3.4.4, wine uses gcc 4.0.3, so maybe there's a compiler bug. My patch adds a padding field that pushes st_size to the correct offset, and Java 1.4.1 now works, no more complaints about truncated class files. And yes, I tried #include <pshpack8.h> and #include <poppack8.h> around the struct - it didn't help. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
participants (1)
-
Wine Bugs