FAQ Search Today's Posts Mark Forums Read

» Linux Archive
Home
New Posts
Search
FAQ


Go Back   Linux Archive > Debian > Debian GCC

 
 
LinkBack Thread Tools
 
Old 12-28-2007, 12:51 PM
Vincent Lefevre
 
Default Bug#458072: cpp-4.1: segmentation fault in cc1 due to infinite loop in error() when using -ftrapv

Package: cpp-4.1
Version: 4.1.1-21
Severity: normal

I get the following segmentation fault:

courge:...re/mpfr-2.3.1-rc1> gcc -DWANT_ASSERT=2 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_STDARG=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SETLOCALE=1 -DHAVE_GETTIMEOFDAY=1 -DMPFR_HAVE_FESETROUND=1 -DHAVE_DENORMS=1 -DHAVE_FLOOR=1 -DHAVE_CEIL=1 -DHAVE_LDOUBLE_IEEE_EXT_LITTLE=1 -DHAVE_ATTRIBUTE_MODE=1 -DHAVE_ALLOCA_H=1 -I. -I. -I/home/vlefevre/x86_64/gmp-debug/include -Wall -Wmissing-prototypes -g -O2 -ftrapv -MT print_raw.lo -MD -MP -MF .deps/print_raw.Tpo -c print_raw.c -fPIC -DPIC -o .libs/print_raw.o
gcc.real: Internal error: Segmentation fault (program cc1)

Note: the print_raw.c file has not changed since MPFR 2.3.0, but
I haven't tried yet to reproduce the bug when compiling MPFR 2.3.0.
The crash doesn't occur without -ftrapv.

courge:...re/mpfr-2.3.1-rc1> gdb /usr/lib/gcc/x86_64-linux-gnu/4.1.2/cc1 core
GNU gdb 6.4.90-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu"...(no debugging symbols found)
Using host libthread_db library "/lib64/libthread_db.so.1".

Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib64/libc.so.6
Reading symbols from /lib/ld-linux-x86-64.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2

Core was generated by `/usr/lib/gcc/x86_64-linux-gnu/4.1.2/cc1 -quiet -I. -I. -I/home/vlefevre/x86_64/'.
Program terminated with signal 11, Segmentation fault.
#0 0x00000000006d458f in error ()
(gdb) bt
#0 0x00000000006d458f in error ()
#1 0x000000000054888b in error ()
#2 0x000000000055434d in error ()
#3 0x0000000000555d63 in error ()
#4 0x00000000005569e1 in error ()
#5 0x0000000000554323 in error ()
#6 0x0000000000555d63 in error ()
#7 0x00000000005569e1 in error ()
#8 0x0000000000554323 in error ()
#9 0x0000000000555d63 in error ()
#10 0x00000000005569e1 in error ()
#11 0x0000000000554323 in error ()
#12 0x0000000000555d63 in error ()
#13 0x00000000005569e1 in error ()
#14 0x0000000000554323 in error ()
#15 0x0000000000555d63 in error ()
#16 0x00000000005569e1 in error ()
#17 0x0000000000554323 in error ()
#18 0x0000000000555d63 in error ()
#19 0x00000000005569e1 in error ()
#20 0x0000000000554323 in error ()
[...]

-- System Information:
Debian Release: 4.0
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.22.6-oprofile-8-core-amd64
Locale: LANG=POSIX, LC_CTYPE=en_US.ISO8859-1 (charmap=ISO-8859-1)

Versions of packages cpp-4.1 depends on:
ii gcc-4.1-base 4.1.1-21 The GNU Compiler Collection (base
ii libc6 2.3.6.ds1-13etch2 GNU C Library: Shared libraries

cpp-4.1 recommends no packages.

-- no debconf information



--
To UNSUBSCRIBE, email to debian-gcc-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 12-28-2007, 01:26 PM
Martin Michlmayr
 
Default Bug#458072: cpp-4.1: segmentation fault in cc1 due to infinite loop in error() when using -ftrapv

* Vincent Lefevre <vincent@vinc17.org> [2007-12-28 13:51]:
> courge:...re/mpfr-2.3.1-rc1> gcc -DWANT_ASSERT=2 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_STDARG=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SETLOCALE=1 -DHAVE_GETTIMEOFDAY=1 -DMPFR_HAVE_FESETROUND=1 -DHAVE_DENORMS=1 -DHAVE_FLOOR=1 -DHAVE_CEIL=1 -DHAVE_LDOUBLE_IEEE_EXT_LITTLE=1 -DHAVE_ATTRIBUTE_MODE=1 -DHAVE_ALLOCA_H=1 -I. -I. -I/home/vlefevre/x86_64/gmp-debug/include -Wall -Wmissing-prototypes -g -O2 -ftrapv -MT print_raw.lo -MD -MP -MF .deps/print_raw.Tpo -c print_raw.c -fPIC -DPIC -o .libs/print_raw.o

Can you add --save-temps to that call and send the resulting .i file.
--
Martin Michlmayr
http://www.cyrius.com/



--
To UNSUBSCRIBE, email to debian-gcc-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 12-28-2007, 04:02 PM
Vincent Lefevre
 
Default Bug#458072: cpp-4.1: segmentation fault in cc1 due to infinite loop in error() when using -ftrapv

On 2007-12-28 14:26:04 +0100, Martin Michlmayr wrote:
> * Vincent Lefevre <vincent@vinc17.org> [2007-12-28 13:51]:
> > courge:...re/mpfr-2.3.1-rc1> gcc -DWANT_ASSERT=2 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_STDARG=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SETLOCALE=1 -DHAVE_GETTIMEOFDAY=1 -DMPFR_HAVE_FESETROUND=1 -DHAVE_DENORMS=1 -DHAVE_FLOOR=1 -DHAVE_CEIL=1 -DHAVE_LDOUBLE_IEEE_EXT_LITTLE=1 -DHAVE_ATTRIBUTE_MODE=1 -DHAVE_ALLOCA_H=1 -I. -I. -I/home/vlefevre/x86_64/gmp-debug/include -Wall -Wmissing-prototypes -g -O2 -ftrapv -MT print_raw.lo -MD -MP -MF .deps/print_raw.Tpo -c print_raw.c -fPIC -DPIC -o .libs/print_raw.o
>
> Can you add --save-temps to that call and send the resulting .i file.

Here is it.

Also, I've tried with a non-Debian gcc 4.2.2 (installed in /usr/local/bin
on this machine) and I get no crash.

--
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)
 
Old 12-28-2007, 06:01 PM
Martin Michlmayr
 
Default Bug#458072: cpp-4.1: segmentation fault in cc1 due to infinite loop in error() when using -ftrapv

fixed 458072 4.1.2-18
thanks

* Vincent Lefevre <vincent@vinc17.org> [2007-12-28 17:02]:
> Here is it.
>
> Also, I've tried with a non-Debian gcc 4.2.2 (installed in /usr/local/bin
> on this machine) and I get no crash.

I can reproduce the problem with 4.1.1-21 from stable but not with
4.1.2-18 from testing/unstable. So I think this has been fixed
upstream (it might be PR30286 but I'm not sure).

--
Martin Michlmayr
http://www.cyrius.com/



--
To UNSUBSCRIBE, email to debian-gcc-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 12-28-2007, 07:50 PM
Vincent Lefevre
 
Default Bug#458072: cpp-4.1: segmentation fault in cc1 due to infinite loop in error() when using -ftrapv

merge 458072 405065
thanks

On 2007-12-28 19:01:15 +0100, Martin Michlmayr wrote:
> I can reproduce the problem with 4.1.1-21 from stable but not with
> 4.1.2-18 from testing/unstable. So I think this has been fixed
> upstream (it might be PR30286 but I'm not sure).

I simplified the code and could reproduce the bug with:

void test (void)
{
int i;
for(i = 2; i >= 0; i--)
{
volatile int j = 0;
}
}

with "gcc -O2 -ftrapv". This is Debian bug 405065, which I reported
almost a year ago (but that was long enough that I didn't remember
it), and PR29534. This is annoying that this bug hadn't been fixed
for etch.

--
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)



--
To UNSUBSCRIBE, email to debian-gcc-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 07:05 AM.

VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org