[Issue 11777] [ICE] dmd memory corruption as `Scope::pop` `free`s `fieldinit` used also in `enclosing`

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Apr 3 22:19:29 PDT 2014


https://d.puremagic.com/issues/show_bug.cgi?id=11777


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull


--- Comment #12 from Kenji Hara <k.hara.pg at gmail.com> 2014-04-03 22:19:15 PDT ---
(In reply to comment #10)
> Let's add `assert(fieldinit != enclosing->fieldinit);` in `Scope::pop` before
> we `free(fieldinit)`. This code fails the assertion (and `nofree` is `false`):
> ---
> void f(void delegate(int)) { }
> 
> class C
> {
>     int i;
>     this() { f((a) {}); }
> }
> ---

Thanks for your work and shrunken test case! It was much helpful for me.

https://github.com/D-Programming-Language/dmd/pull/3423

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


More information about the Digitalmars-d-bugs mailing list