[Bug 920134] New: windows:mingw:win{32,64}/mingw{32,64}-binutils: windmc memory bug
http://bugzilla.opensuse.org/show_bug.cgi?id=920134 Bug ID: 920134 Summary: windows:mingw:win{32,64}/mingw{32,64}-binutils: windmc memory bug Classification: openSUSE Product: openSUSE.org Version: unspecified Hardware: All OS: Windows Status: NEW Severity: Major Priority: P5 - None Component: 3rd party software Assignee: fstrba@suse.com Reporter: gitne@gmx.de QA Contact: opensuse-communityscreening@forge.provo.novell.com CC: fridrich.strba@bluewin.ch, gitne@gmx.de, hib@hiberis.nl, mkbosmans@gmail.com, tlillqvist@suse.com Found By: Community User Blocker: No Created attachment 624972 --> http://bugzilla.opensuse.org/attachment.cgi?id=624972&action=edit Sample source message file for windmc without a trailing line feed (U+000A) character If the input file does not end with a line feed character (U+000A) the windmc tool eats up all the memory and then terminates with an out of memory error. To reproduce, try the atteched sample.mc file. Append a line feed character at the end of the file and windmc works (mostly) as intended. Warning: Be careful when reproducing on 64 bit systems with lots of RAM and/or swap space. This operation may cause the system to seemingly block for an extended amount of time. It is probably best to use the mingw32 version of windmc or to specifically limit the available amount of memory to the process to a reasounable amount. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=920134 http://bugzilla.opensuse.org/show_bug.cgi?id=920134#c1 Ralf Habacker <ralf.habacker@freenet.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ralf.habacker@freenet.de --- Comment #1 from Ralf Habacker <ralf.habacker@freenet.de> --- This is still a problem with mingw{32|64}-binutils-2.33.1 The 64 bit variant eats all memory and the 32bit version crashes with an out of memory exception. wine /usr/i686-w64-mingw32/sys-root/mingw/bin/windmc.exe ~/Downloads/sample.mc Z:\usr\i686-w64-mingw32\sys-root\mingw\bin\windmc.exe: out of memory allocating 4064 bytes -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=920134 http://bugzilla.opensuse.org/show_bug.cgi?id=920134#c2 Ralf Habacker <ralf.habacker@freenet.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |CONFIRMED --- Comment #2 from Ralf Habacker <ralf.habacker@freenet.de> --- The reason is an endless loop in the parser caused by not detecting end of stream condition in the lexer (https://github.com/bminor/binutils-gdb/blob/8affa48ac7c55ade04713654a22f1c56...) Fortunally this issue was fixed yesterday with the following commit https://github.com/bminor/binutils-gdb/commit/8affa48ac7c55ade04713654a22f1c... -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=920134 http://bugzilla.opensuse.org/show_bug.cgi?id=920134#c3 --- Comment #3 from Ralf Habacker <ralf.habacker@freenet.de> --- (In reply to Ralf Habacker from comment #2)
The reason is an endless loop in the parser caused by not detecting end of stream condition in the lexer (https://github.com/bminor/binutils-gdb/blob/ 8affa48ac7c55ade04713654a22f1c56319b1195/binutils/mclex.c#L327)
This has been reported to the binutils bug tracker with bug https://sourceware.org/bugzilla/show_bug.cgi?id=26082 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=920134 http://bugzilla.opensuse.org/show_bug.cgi?id=920134#c4 --- Comment #4 from Ralf Habacker <ralf.habacker@freenet.de> --- (In reply to Ralf Habacker from comment #3)
This has been reported to the binutils bug tracker with bug https://sourceware.org/bugzilla/show_bug.cgi?id=26082
And here is an appliable git formatted patch https://sourceware.org/bugzilla/attachment.cgi?id=12592(In reply to Ralf Habacker from comment #3), which fixes at least the out of memory issue. -- You are receiving this mail because: You are on the CC list for the bug.
And here is an appliable git formatted patch https://sourceware.org/bugzilla/attachment.cgi?id=12592 Unfortunally with that patch applied a parse error remains, which is fixed with
http://bugzilla.opensuse.org/show_bug.cgi?id=920134 http://bugzilla.opensuse.org/show_bug.cgi?id=920134#c5 --- Comment #5 from Ralf Habacker <ralf.habacker@freenet.de> --- Created attachment 838566 --> http://bugzilla.opensuse.org/attachment.cgi?id=838566&action=edit 0001-Fix-parse-error-in-the-Windows-resource-parser.patch (In reply to Ralf Habacker from comment #4) the appended patch. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=920134 http://bugzilla.opensuse.org/show_bug.cgi?id=920134#c6 --- Comment #6 from Ralf Habacker <ralf.habacker@freenet.de> --- Created attachment 838568 --> http://bugzilla.opensuse.org/attachment.cgi?id=838568&action=edit 0002-Fix-catching-EOF-in-the-Windows-resource-parser.patch This patch fixes additional cases where end of file is not detected correctly, which may also result into 'out of memory' errors on unusual file contents. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=920134 http://bugzilla.opensuse.org/show_bug.cgi?id=920134#c7 --- Comment #7 from Ralf Habacker <ralf.habacker@freenet.de> --- (In reply to Ralf Habacker from comment #5)
Created attachment 838566 [details] 0001-Fix-parse-error-in-the-Windows-resource-parser.patch
(In reply to Ralf Habacker from comment #6)
Created attachment 838568 [details] 0002-Fix-catching-EOF-in-the-Windows-resource-parser.patch
These patches has been applied to upstream bug, see https://sourceware.org/bugzilla/show_bug.cgi?id=26082. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=920134 Ralf Habacker <ralf.habacker@freenet.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #838566|0 |1 is obsolete| | -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=920134 Ralf Habacker <ralf.habacker@freenet.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #838568|0 |1 is obsolete| | -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=920134 http://bugzilla.opensuse.org/show_bug.cgi?id=920134#c8 --- Comment #8 from Ralf Habacker <ralf.habacker@freenet.de> --- (In reply to Ralf Habacker from comment #7)
(In reply to Ralf Habacker from comment #5)
Created attachment 838566 [details] 0001-Fix-parse-error-in-the-Windows-resource-parser.patch
(In reply to Ralf Habacker from comment #6)
Created attachment 838568 [details] 0002-Fix-catching-EOF-in-the-Windows-resource-parser.patch
These patches has been applied to upstream bug, see https://sourceware.org/bugzilla/show_bug.cgi?id=26082.
It has been agreed with the binutils maintainer that these patches are not applicable in this way, as the included changes change the behaviour of windmc compared to the original. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=920134 http://bugzilla.opensuse.org/show_bug.cgi?id=920134#c9 --- Comment #9 from Ralf Habacker <ralf.habacker@freenet.de> --- (In reply to Ralf Habacker from comment #8)
It has been agreed with the binutils maintainer that these patches are not applicable in this way, as the included changes change the behaviour of windmc compared to the original.
Bug was fixed upstream, see https://sourceware.org/bugzilla/show_bug.cgi?id=26082#c16 for details by the following patches: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=8affa48ac7c55ade0... https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=25065fcd192d9958c0... -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=920134 http://bugzilla.opensuse.org/show_bug.cgi?id=920134#c10 Ralf Habacker <ralf.habacker@freenet.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|CONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #10 from Ralf Habacker <ralf.habacker@freenet.de> --- (In reply to Ralf Habacker from comment #9)
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git; h=8affa48ac7c55ade04713654a22f1c56319b1195 https://sourceware.org/git/?p=binutils-gdb.git;a=commit; h=25065fcd192d9958c03e107985aea41d651e4a16
Patches were submitted to obs with https://build.opensuse.org/package/show/windows:mingw:win32/mingw32-binutils... https://build.opensuse.org/package/show/windows:mingw:win64/mingw64-binutils... -- You are receiving this mail because: You are on the CC list for the bug.
participants (2)
-
bugzilla_noreply@novell.com
-
bugzilla_noreply@suse.com