Memory leak when calling span_fatal from trans

4f50b1d
Opened by Marijn Haverbeke at 2012-04-24 21:55:34

Commit 68f88125115fb239c79efa655570fdcae821765c introduces a check that can't easily be done in any pass before trans. The test case in that commit is disabled because currently it will cause a memory leak (12 objects lost) when compiled.

  1. This test succeeds when I modify type_needs_unwind_cleanup to always return true. There is some type here that gets cleaned up correctly via landing pads, but can't be found by the box annihilator.

    Brian Anderson at 2012-04-23 23:36:33

  2. type_needs_unwind_cleanup is completely broken I believe. Oops.

    Brian Anderson at 2012-04-24 01:36:49

  3. I think I just got bit by the same bug -- see the above-referenced commit. In my case I was calling span_fatal from typeck. The fix @brson suggested fixed it as well, but rather than checking in that fix, I just xfailed the test (class-implements-int), since @brson said he was going to work on it tomorrow.

    Tim Chevalier at 2012-04-24 04:18:16