Bug 1554 – Segfault in generated code.

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Linux
Creation time
2007-10-07T21:51:00Z
Last change time
2015-06-09T05:14:50Z
Assigned to
dvdfrdmn
Creator
dlang

Attachments

IDFilenameSummaryContent-TypeSize
189bug.dDemonstration of compilation bug.text/plain356

Comments

Comment #0 by dlang — 2007-10-07T21:51:07Z
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.
Comment #1 by dlang — 2007-10-07T21:51:39Z
Created attachment 189 Demonstration of compilation bug.
Comment #2 by dvdfrdmn — 2007-10-13T13:33:11Z
Fixed in svn 181 / release 0.25.