Bug 10964 – [REG][2.063] Static array assign/blit exception slips through catch block.

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-09-04T14:00:00Z
Last change time
2013-09-06T22:59:52Z
Keywords
pull, wrong-code
Assigned to
nobody
Creator
monarchdodra

Comments

Comment #0 by monarchdodra — 2013-09-04T14:00:09Z
Regression in 2.062 => 2.063 Basically, when a you assign to a static array (and it postblits elements), if an exception is thrown, it is not caught by "catch(Exception)". It *is* caught by "catch(Throwable)" though, yet not by "catch("Error")". //---- import std.stdio; struct S { this(this) { throw new Exception("BOOM!"); } } void main() { S s; S[1] ss; writeln("s = s"); try { s = s; } catch(Exception e) writeln("caught in Exception"); catch(Error e) writeln("caught in Error"); catch(Throwable e) writeln("caught in Throwable"); writeln("ss = s"); try { ss = s; } catch(Exception e) writeln("caught in Exception"); catch(Error e) writeln("caught in Error"); catch(Throwable e) writeln("caught in Throwable"); writeln("ss = ss"); try { ss = ss; } catch(Exception e) writeln("caught in Exception"); catch(Error e) writeln("caught in Error"); catch(Throwable e) writeln("caught in Throwable"); } //---- 2.062: s = s caught in Exception ss = s caught in Exception ss = ss caught in Exception 2.063: s = s caught in Exception ss = s caught in Throwable ss = ss caught in Throwable
Comment #1 by k.hara.pg — 2013-09-04T19:27:06Z
Comment #2 by k.hara.pg — 2013-09-04T21:18:36Z
Comment #3 by github-bugzilla — 2013-09-06T22:59:42Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/1b182591c2c0720a721317a8fdc5064bff90b26e fix Issue 10964 - Static array assign/blit exception slips through catch block. https://github.com/D-Programming-Language/dmd/commit/49d96b52484ac7051fe077f7c92f6a8f9844c717 Merge pull request #2525 from 9rnsr/fix10964 [REG2.063] Issue 10964 - Static array assign/blit exception slips through catch block