www.digitalmars.com         C & C++   DMDScript  

D.gnu - [Issue 1554] New: Segfault in generated code.

reply d-bugmail puremagic.com writes:
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 users.sf.net
        ReportedBy: dlang 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.


-- 
Oct 07 2007
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1554






Created an attachment (id=189)
 --> (http://d.puremagic.com/issues/attachment.cgi?id=189&action=view)
Demonstration of compilation bug.


-- 
Oct 07 2007
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1554


dvdfrdmn users.sf.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED





Fixed in svn 181 / release 0.25.


-- 
Oct 13 2007