digitalmars.D.bugs - [Issue 8301] New: Exception not caught when a big array is allocated
- d-bugmail puremagic.com (30/30) Jun 26 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8301
- d-bugmail puremagic.com (16/16) Jun 26 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8301
http://d.puremagic.com/issues/show_bug.cgi?id=8301 Summary: Exception not caught when a big array is allocated Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: major Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: mp81ss rambler.ru --- Comment #0 from Michele Pes <mp81ss rambler.ru> 2012-06-26 07:08:59 PDT --- import std.stdio; void main() { try { byte[] big_buf = new byte[4294967295]; writeln("Allocated"); } catch(Exception) { writeln("never displayed"); } } The string "never displayed" is never displayed and the client crushes with object.Error: Access Violation. Same if instead of (2^32 -1) you put -1. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 26 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8301 timon.gehr gmx.ch changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |timon.gehr gmx.ch Summary|Exception not caught when a |Access violation when a big |big array is allocated |array is allocated Severity|major |normal --- Comment #1 from timon.gehr gmx.ch 2012-06-26 08:35:49 PDT --- It is to be expected that catch(Exception) will not catch an Error, because Exception is not a super class of Error. However, the code snippet should throw OutOfMemoryError. There should not be an access violation. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 26 2012