[Issue 16107] [ICE] - Internal error: backend/cgcod.c 2297

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Sep 2 10:04:41 PDT 2016


https://issues.dlang.org/show_bug.cgi?id=16107

--- Comment #5 from hsteoh at quickfur.ath.cx ---
I managed to trace the error to freenode() in backend/cgcod.c, for some reason
it gets called with an elem with e->Ecomsub==0, so when it tries to decrement
it, e->Ecomsub rolls over to 255, which eventually triggers this assert.

However, I couldn't figure out enough of the backend code to actually fix this.
I tried changing the if-statement in freenode() to `if (e->Ecomsub==0 ||
e->Ecomsub--) return;`, and it works for this particular test case, but then it
fails to compile the d_do_test tool, so obviously this is the wrong fix. So
this will probably need Walter to look at it. :-P

--


More information about the Digitalmars-d-bugs mailing list