[Bug 18632] New: libgklayout.dll compiled from mingw fails to load (.dll from Firefox)
http://bugs.winehq.org/show_bug.cgi?id=18632 Summary: libgklayout.dll compiled from mingw fails to load (.dll from Firefox) Product: Wine Version: 1.1.22 Platform: Other OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: loader AssignedTo: wine-bugs(a)winehq.org ReportedBy: sylvain.pasche(a)gmail.com This is with wine from git (version wine-1.1.22-51-g85b6189) on Ubuntu 9.04, 32bit. Steps to reproduce: - Download Mozilla source from http://hg.mozilla.org/mozilla-central/ - Follow the instructions at https://developer.mozilla.org/index.php?title=En%2FCross_Compile_Mozilla_for... for cross compiling it (I had to do some adjustments to the source in order to compile). - copy libgcc_s_sjlj-1.dll in the $objdir/dist/bin directory (required by mingw). - Try to load Firefox. It fails to load, because a required .dll fails to load. The Firefox output is: *** Registering components in: Apprunner nsNativeModuleLoader::LoadModule("Z:\home\sypasche\moz\cross\objdir-i686-mingw32\dist\bin_deref\components\gklayout.dll") - load FAILED, rv: 80004003, error: Exec format error The relevant logs: 0009:trace:module:load_native_dll Trying native dll L"Z:\\home\\sypasche\\moz\\cross\\objdir-i686-mingw32\\dist\\bin_deref\\components\\gklayout.dll" 0009: create_mapping( access=000f0005, attributes=00000000, protect=00000141, size=00000000, file_handle=00bc, objattr={rootdir=0000,sd={},name=L""} ) 0009: create_mapping() = 0 { handle=00c4 } 0009:trace:virtual:NtMapViewOfSection handle=0xc4 process=0xffffffff addr=(nil) off=000000000 size=0 access=2 0009: get_mapping_info( handle=00c4, access=00000004 ) 0009: get_mapping_info() = 0 { size=0a857000, protect=256, header_size=1536, base=6c140000, mapping=00c8, shared_file=0000 } 0009: get_handle_fd( handle=00c4 ) 0009: *fd* 00c4 -> 79 0009: get_handle_fd() = 0 { type=1, removable=0, access=000f0005, options=00000000 } 0009: close_handle( handle=00c8 ) 0009: close_handle() = 0 0009: close_handle( handle=00c4 ) 0009: close_handle() = 0 0009:warn:module:load_dll Failed to load module L"Z:\\home\\sypasche\\moz\\cross\\objdir-i686-mingw32\\dist\\bin_deref\\components\\gklayout.dll"; status=c0000017 status=c0000017 should be STATUS_NO_MEMORY The resulting binaries load fine on Windows, so there may be some issue on Wine's side. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=18632 Dmitry Timoshkov <dmitry(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|loader |-unknown --- Comment #1 from Dmitry Timoshkov <dmitry(a)codeweavers.com> 2009-05-26 21:32:23 --- Please compress and attach the DLL with any dependencies it requires to the bug. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=18632 Sylvain Pasche <sylvain.pasche(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|libgklayout.dll compiled |gklayout.dll compiled from |from mingw fails to load |mingw fails to load (.dll |(.dll from Firefox) |from Firefox) --- Comment #2 from Sylvain Pasche <sylvain.pasche(a)gmail.com> 2009-05-27 07:47:51 --- That dll is huge (181Mb not counting dependencies), so I tried to strip it but after that Firefox could run without problems. I tried to load that dll form a simple testcase doing just a LoadLibrary, but then it loads fine. Then I tried to run strace on both Firefox and the testcase in order to compare, and apparently the issue is that the mmap2() call fails when running from Firefox, but not from the testcase.
From the testcase:
mmap2(0x6c140000, 176517120, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x6c140000
From Firefox:
mmap2(0x6c140000, 176517120, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory) I'm wondering why the mmap2() call fails when Firefox tries to load that .dll. I've got enough memory, and ulimit -a doesn't show maximum memory size limitation. I could put an archive of the build somewhere if you want to try, but it's rather large (600Mb uncompressed). -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=18632 --- Comment #3 from Alexandre Julliard <julliard(a)winehq.org> 2009-05-27 08:37:18 --- Created an attachment (id=21359) --> (http://bugs.winehq.org/attachment.cgi?id=21359) Fall back to any address for all map_view errors You are most likely running out of non-reserved address space. This should help. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=18632 --- Comment #4 from Sylvain Pasche <sylvain.pasche(a)gmail.com> 2009-05-27 09:04:26 --- Yes, that helps. The second mmap call doesn't fail: mmap2(0x6c140000, 176517120, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory) mmap2(0xab60000, 176517120, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xab60000 -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=18632 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED --- Comment #5 from Austin English <austinenglish(a)gmail.com> 2010-03-11 17:01:58 --- (In reply to comment #4)
Yes, that helps.
The second mmap call doesn't fail:
mmap2(0x6c140000, 176517120, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory) mmap2(0xab60000, 176517120, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xab60000
Fixed by http://source.winehq.org/git/wine.git/?a=commitdiff;h=54ac26b7af68630d1e1f90... -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=18632 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #6 from Alexandre Julliard <julliard(a)winehq.org> 2010-03-19 14:10:30 --- Closing bugs fixed in 1.1.41. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
participants (1)
-
wine-bugs@winehq.org