http://d.puremagic.com/issues/show_bug.cgi?id=6376



--- Comment #5 from kenn...@gmail.com 2011-07-25 06:05:42 PDT ---
(In reply to comment #4)
> The segfault for case 2 happens in _d_throwc:
> 
>     // this is a catch handler (no finally)
> 
>     auto pci = cast(DCatchInfo *)(cast(char *)handler_table + phi.cioffset);
>     auto ncatches = pci.ncatches;
>     for (int i = 0; i < ncatches; i++)
>     {
>         auto ci = **cast(ClassInfo **)h;  // <--------- this line, *h == null
> 
>         auto pcb = &pci.catch_block[i];

Actually this is because I compile with -debug. Without -debug, _d_throwc is
not no-return, causing originally unreachable statements e.g.

extern (C) void onAssertError( string file = __FILE__, size_t line = __LINE__ )
{
    if( assertHandler is null )
        throw new AssertError( file, line );
    assertHandler( file, line, null);   // <-------- this line
}

to be run.

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

Reply via email to