[Issue 4185] New: Existence of an empty, uncalled function that takes an argument generates segfaulting executable.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu May 13 17:01:07 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4185
Summary: Existence of an empty, uncalled function that takes an
argument generates segfaulting executable.
Product: D
Version: 2.041
Platform: Other
OS/Version: Linux
Status: NEW
Severity: major
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: blood.of.life at gmail.com
--- Comment #0 from Bernard Helyer <blood.of.life at gmail.com> 2010-05-13 17:01:02 PDT ---
void* bar;
void foo(void*) {}
void baz() { foo(bar); }
void main() {}
This code causes DMD to produce an executable that segfaults inside of
GC.collect.
(gdb) bt
#0 0x08050aa2 in
_D4core6thread17thread_suspendAllUZv7suspendMFC4core6thread6ThreadZv ()
#1 0x08050a1b in thread_suspendAll ()
#2 0x0804decd in _D2gc3gcx3Gcx11fullcollectMFPvZk ()
#3 0x0804deae in _D2gc3gcx3Gcx16fullcollectshellMFZk ()
#4 0x0804d115 in _D2gc3gcx2GC18fullCollectNoStackMFZv ()
#5 0x0804bd20 in gc_term ()
#6 0x0804a9b0 in _D2rt6dmain24mainUiPPaZi6runAllMFZv ()
#7 0x0804a8b9 in _D2rt6dmain24mainUiPPaZi7tryExecMFMDFZvZv ()
#8 0x0804a868 in main ()
However, in the course of boiling down a test case, the segfault has moved
around with great regularity (inside of a library SO, inside of libc.exit,
whilst appending to an array, the list goes on), so I'm speculating that it's
some kind of memory corruption.
This occurs on Linux using D2, neither D1 nor Windows using D1,D2 manifests
this issue.
--
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