[Issue 1554] New: Segfault in generated code.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Oct 7 19:51:08 PDT 2007


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

           Summary: Segfault in generated code.
           Product: DGCC aka GDC
           Version: 0.24
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: glue layer
        AssignedTo: dvdfrdmn at users.sf.net
        ReportedBy: dlang at davidb.org


The attached example code exhibits a segfault on x86 when compiled with
"-O3 --fomit-frame-pointer". This is the binary gdc downloaded from the
web.

% gdc --version
gdc (GCC) 4.1.2 20070214 ( (gdc 0.24, using dmd 1.020))
...

% gdc -o bug -O3 bug.d
% ./bug
10,240kB

% gdc -o bug -O3 -fomit-frame-pointer bug.d
% ./bug
Segmentation fault

% gdc -g -o bug -O3 -fomit-frame-pointer bug.d
% gdb ./bug
(gdb) run
Starting program: /home/davidb/wd/adump/2.1/bug/bug 
warning: Lowest section in system-supplied DSO at 0xffffe000 is .hash at
ffffe0b4
[Thread debugging using libthread_db enabled]
[New Thread -136127808 (LWP 14962)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -136127808 (LWP 14962)]
_D3bug10formatSizeFlZAa (size=578398486928556032) at bug.d:9
9 foreach (ind, ch; text.reverse) {
Current language: auto; currently minimal

The example works fine on x86_64.


-- 



More information about the D.gnu mailing list