[Issue 4568] New: Segfault in program that writes an array
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Aug 1 23:15:27 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4568
Summary: Segfault in program that writes an array
Product: D
Version: D2
Platform: Other
OS/Version: Mac OS X
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: jyasskin at gmail.com
--- Comment #0 from Jeffrey Yasskin <jyasskin at gmail.com> 2010-08-01 23:15:25 PDT ---
$ cat test.d
import std.stdio;
void main(string[] args) {
std.stdio.writeln(args);
}
$ dmd test.d
$ ./test
Segmentation fault
$ ./test|cat
$ uname -a
Darwin jyasskin-macbookpro.local 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15
16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386 i386 MacBookPro2,2
Darwin
$ dmd --help
Digital Mars D Compiler v2.047
...
The segfault is weird in that it goes away when stdout is redirected through
cat. The expected output still doesn't appear though. gdb reports:
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: 13 at address: 0x00000000
0x0000ad3d in __tls_get_addr ()
(gdb) bt
#0 0x0000ad3d in __tls_get_addr ()
#1 0x000078f9 in _moduleTlsCtor ()
#2 0x0000760a in _moduleCtor ()
#3 0x0000ff70 in D2rt6dmain24mainUiPPaZi6runAllMFZv ()
#4 0x0000fe7e in D2rt6dmain24mainUiPPaZi7tryExecMFMDFZvZv ()
#5 0x0000fe0c in main ()
--
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