D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 1959 - ICE(eh.c 41) alloca and Linux exception handling
Summary: ICE(eh.c 41) alloca and Linux exception handling
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: x86 Linux
: P2 normal
Assignee: No Owner
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2008-03-30 13:04 UTC by Sergey Redin
Modified: 2014-02-24 15:33 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Sergey Redin 2008-03-30 13:04:30 UTC
// file bad.d:
import std.process;
void main(char[][] argv) {
        bool cond = false;
        while( cond ) try { } catch { }
        execvp( argv[0], argv );
}
// end of file

Compilation error:

sergey:/tmp/eh$ dmd |head -1
Digital Mars D Compiler v1.028
sergey:/tmp/eh$ dmd -release -inline -c bad.d
Internal error: eh.c 41
sergey:/tmp/eh$

Sorry if it is duplicate of #1337 but my issue seem to have nothing to do with threads or memory allocation. This code is useless but I hit the bug with much more code, this is just the minimal version that still triggers compilation error.
Comment 1 Sergey Redin 2008-04-06 05:09:25 UTC
Hello, is there anybody here? :)
Comment 2 BCS 2008-04-07 13:56:45 UTC
Yes. What do you want someone to say? You found a bug, reported it with an example. About the only constructive thing to be said is, "fixed" and that's not going to happen for a few days at the least (more likely it will be a few releases). No comments means nobody has anything constructive to say, not that you are being ignored.
Comment 3 Sergey Redin 2008-04-07 18:29:23 UTC
OK, thanks.
Comment 4 Stewart Gordon 2008-11-20 21:04:50 UTC
WFM DMD 1.036 Windows.  Can you still reproduce under Linux?
Comment 5 David Simcha 2008-11-25 13:22:17 UTC
Ran into this on Linux with DMD 2.20.  I'm working on isolating the piece of code that's the problem, but it's definitely still a problem.
Comment 6 Don 2009-07-10 00:07:55 UTC
Line eh.c (41) states:

#if TARGET_LINUX || TARGET_OSX || TARGET_FREEBSD || TARGET_SOLARIS
:
    // BUG: alloca() changes the stack size, which is not reflected
    // in the fixed eh tables.
    assert(!usedalloca);

So this is a known bug.
Comment 7 Don 2009-09-13 03:37:17 UTC
I'm closing this because the original bug has been fixed, and all known test cases pass. Create a new bug if a new test case is discovered. It'll be a different bug, even if it ICEs at the same location.