www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10964] New: [REG][2.063] Static array assign/blit exception slips through catch block.

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10964

           Summary: [REG][2.063] Static array assign/blit exception slips
                    through catch block.
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: monarchdodra gmail.com


--- Comment #0 from monarchdodra gmail.com 2013-09-04 14:00:09 PDT ---
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

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 04 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10964



--- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2013-09-04 19:27:06 PDT ---
Introduced by the commit:
https://github.com/D-Programming-Language/dmd/commit/b4a5c9cf3a82678b7f0c8de022115de5d7244b4f

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 04 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10964


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull, wrong-code


--- Comment #2 from Kenji Hara <k.hara.pg gmail.com> 2013-09-04 21:18:36 PDT ---
https://github.com/D-Programming-Language/dmd/pull/2525

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 04 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10964



--- Comment #3 from github-bugzilla puremagic.com 2013-09-06 22:59:42 PDT ---
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

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 06 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10964


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 06 2013