[Issue 8924] New: Delegate becomes invalid after a while
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Oct 31 15:45:52 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8924
Summary: Delegate becomes invalid after a while
Product: D
Version: D2
Platform: x86_64
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: malteskarupke at web.de
--- Comment #0 from Malte Skarupke <malteskarupke at web.de> 2012-10-31 15:45:46 PDT ---
Created an attachment (id=1158)
Run this file and you should get a segmentation fault.
I have a bug that was quite a mess to figure out because it seemed to happen
randomly. It turns out that a delegate with stack references becomes invalid
after the program has run for a while.
I don't have a concise repro-case, but I've attached a file which shows the
problem somewhat concisely. If you run it you should see a segmentation fault.
In that file you'll see a loop in line 437, which counts from 0 to 10000. If I
change that loop to count only to 1000, the bug doesn't happen. So if you don't
experience the bug, try changing it to 100000 and see if the bug then happens.
That loop simply does unrelated work and the amount of times it runs shouldn't
affect the bug at all, but somehow it does.
If I'm doing something invalid in the code, it should crash right away and not
work at first and then stop working after a while.
--
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