www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 4568] New: Segfault in program that writes an array

reply d-bugmail puremagic.com writes:
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 puremagic.com
        ReportedBy: jyasskin gmail.com


--- Comment #0 from Jeffrey Yasskin <jyasskin 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: -------
Aug 01 2010
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4568


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |WORKSFORME


--- Comment #1 from Walter Bright <bugzilla digitalmars.com> 2012-01-28
15:09:33 PST ---
Can't reproduce with dmd 2.058.

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