[Issue 9449] Segmentation fault in main()

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Feb 8 20:36:55 PST 2013


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


hsteoh at quickfur.ath.cx changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hsteoh at quickfur.ath.cx


--- Comment #1 from hsteoh at quickfur.ath.cx 2013-02-08 20:36:49 PST ---
Something is very screwy with the executable that DMD produces for this code.
For example:

$ cat test.d
import core.simd;

void main() {
    ubyte16 table[1];
}
$ dmd -L--export-dynamic -g -m64 test.d
$ gdb test
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /tmp/test...done.
(gdb) break Dmain
Segmentation fault
$


Commenting out the ubyte16 line makes the problem go away (it will correctly
set the breakpoint). Looks like the codegen is screwed up somewhere?

-- 
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