Bug 5072 – Iterating an empty result returned by match() crashes the application

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2010-10-18T11:50:00Z
Last change time
2013-02-26T09:01:33Z
Assigned to
dmitry.olsh
Creator
pislan

Attachments

IDFilenameSummaryContent-TypeSize
785Bug.zipFull D program that reproduces bug.application/octet-stream794

Comments

Comment #0 by pislan — 2010-10-18T11:50:17Z
Created attachment 785 Full D program that reproduces bug. In this code: try { foreach( r; result.captures) writeln(r); } catch(Exception * exc) { //we never get here } if result is empty the application exits. And no exception is caught. Full program attached. Tested with D2 compiler. Version: not specified. Size: 1.340.444 bytes
Comment #1 by braddr — 2011-02-06T15:38:53Z
Mass migration of bugs marked as x86-64 to just x86. The platform run on isn't what's relevant, it's if the app is a 32 or 64 bit app.
Comment #2 by andrei — 2013-02-26T08:55:17Z
Passed on to Dmitry.
Comment #3 by dmitry.olsh — 2013-02-26T09:01:33Z
2010 ... that was a year before the new std.regex. Now it just works and empty result is, well, just an empty range. This is what I see: Running Test1() Running Test2() Press any key to continue... The last line is printed by the app so no crashes here (Win32).