[Issue 8774] 2.059 worked 2.060 does not: nested delegate memory corruption

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Dec 27 03:37:41 PST 2012


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



--- Comment #33 from Dmitry Olshansky <dmitry.olsh at gmail.com> 2012-12-27 03:37:35 PST ---
(In reply to comment #31)
> I did find a long time bug in the way closures are nested. This was not a
> regression.

Terrific, thanks!

> The non-thread test cases here are now fixed, but I don't know
> about the original problem with joining, so I won't mark it fixed just yet.
> 

The code shouldn't work and after fixing a bug in the compiler and in the code
itself it works :)

For me on Win32 the breakdown across full versions (dmd+phobos+druntime) is as
follows:

2.061 with the latest patch:
with .array: works
w/o  .array: fails as it should (Unnable to join)

2.057-2.058 and 2.060 
with .array: segfaults due to closure bug with stack corruption, can workaround
in the same way as discussed here
w/o  .array: fails as it should (Unnable to join)

2.059:
with .array: fails to compile with a range of Thread (!)
w/o  .array: fails as it should (Unable to join)

2.053-2.056:
 -fails to compile (no inference for nested function), fixing that it fails
with segfault (the same closure thing)
 -fails as it should  (Unable to join)

2.052 - fails to compile(cannot access frame of ...)

2.049-2.051 had no std.datetime & std.parallelism but even with it ripped off
fails to compile as 2.052.

Thus I conclude that the issue with threading is invalid and is not a
regression.

The only mystery remaining is why (and when?) it *did* work before. Probably it
did work with LDC but then stopped. LDC is not affected by the closure bug and
uses a patched fork of D run-time.

So I'd go ahead and close it as resolved fixed as a long standing critical bug
with stack corruption in nested delegates.

Russel are you OK with that?

> It's likely that this was causing problems in other bugzilla issues.

Time to go on a witch-hunt! Maxim presented an excelent list to check.

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


More information about the Digitalmars-d-bugs mailing list