First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 16043
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: PPC Porters <ppc@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Steven Lucy <slucy@uchicago.edu>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 16043 depends on: Show dependency tree
Show dependency graph
Bug 16043 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)







View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2003-02-19 18:22 0000
bc, with the -l option, segfaults when you enter any calculation to perform.

this only happens with -O2 in CFLAGS.  the ebuild should strip this out, or
another fix should be implemented.

Reproducible: Always
Steps to Reproduce:
1. emerge sys-devel/bc-1.06-r4
2. echo "5/4" | bc -ql
3.

Actual Results:  
Segmentation fault (core dumped)


Expected Results:  
1.25000000000000000000


CFLAGS="-O2 -pipe -mcpu=7400 -maltivec -mabi=altivec -mpowerpc-gfxopt
-fsigned-char -g"
(removing the -O2 fixes the problem)

Program received signal SIGSEGV, Segmentation fault.
addbyte (byte=75 'K') at load.c:68
68      load.c: No such file or directory.
        in load.c
(gdb) backtrace
#0  addbyte (byte=75 'K') at load.c:68
#1  0x100067d8 in load_code (code=0x4b <Address 0x4b out of bounds>)
    at load.c:307
#2  0x10008784 in generate (str=0x1000dd70 "K") at util.c:278
#3  0x1000330c in yyparse () at bc.y:545
#4  0x10002260 in main (argc=2, argv=0x7ffffb44) at main.c:259
#5  0x0fdfedec in __libc_start_main () from /lib/libc.so.6

Portage 2.0.47-r2 (default-ppc-1.4, gcc-3.2.1, glibc-2.2.5-r4,2.3.1-r2)
=================================================================
System uname: 2.4.19-r6 ppc 
GENTOO_MIRRORS="http://gentoo.oregonstate.edu/
http://www.ibiblio.org/pub/Linux/distributions/gentoo"
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config
/usr/kde/2/share/config /usr/kde/3/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR_OVERLAY=""
USE="oss dvd xv jpeg nls mitshm gif sdl png truetype ppc gdbm berkdb slang
readline tetex aalib java gpm tcpd pam libwww ssl perl python esd imlib
oggvorbis motif opengl mozilla X gtk -gnome -alsa -kde -qt"
COMPILER="gcc3"
CHOST="powerpc-unknown-linux-gnu"
CFLAGS="-O2 -pipe -mcpu=7400 -maltivec -mabi=altivec -mpowerpc-gfxopt
-fsigned-char -g"
CXXFLAGS="-O2 -pipe -mcpu=7400 -maltivec -mabi=altivec -mpowerpc-gfxopt
-fsigned-char"
ACCEPT_KEYWORDS="ppc"
MAKEOPTS="-j2"
AUTOCLEAN="yes"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
FEATURES="ccache userpriv sandbox usersandbox"

------- Comment #1 From Justin Blanchard 2003-02-19 18:30:47 0000 -------
This also happens under gcc 2.95.3 (i.e., a 1.0 profile). Although the numbers
in the backtrace are different, the trace itself is the same.

------- Comment #2 From Steven Lucy 2003-02-19 19:35:56 0000 -------
update:  "-O0 -f(everything in 'man gcc')" runs just fine, whereas
"-O1 -fno-(everthing in 'man gcc" segfaults.
this is rather odd.


here's the list of -fs i'm working with:

 -fsigned-char 
-ffloat-store -fdefault-inline -fdefer-pop -fforce-mem -fforce-addr
-fomit-frame-pointer -foptimize-sibling-calls -ftrapv -finline
-fkeep-static-consts -fmerge-constants -fmerge-all-constants -fbranch-count-reg
-ffunction-cse -fmath-errno -funsafe-math-optimizations -ftrapping-math
-fbounds-check -fstrength-reduce -fthread-jumps -fcse-follow-jumps
-fcse-skip-blocks -frerun-cse-after-loop -frerun-loop-opt -fgcse -fgcse-lm
-fgcse-sm -fdelete-null-pointer-checks -fexpensive-optimizations
-foptimize-register-move -fregmove -fdelayed-branch -fschedule-insns
-fschedule-insns2 -fsched-interblock -fsched-spec -fschedule-insns
-fsched-spec-load -ffunction-sections -fdata-sections

------- Comment #3 From Mark Guertin 2003-02-19 20:24:24 0000 -------
looking into this further, for now filtered -O2 for ppc

------- Comment #4 From Graham Forest 2003-04-22 15:46:06 0000 -------
What's the status on this? Gerk left, and I'm trying to ping() a few bugs and
try to see what's up.

------- Comment #5 From Steven Lucy 2003-04-24 01:39:07 0000 -------
well the ebuild now filters -O2 for ppc, so the problem is 'solved'.

i believe it is an upstream bug, but i don't know where gerk (or others)
were going with that, if they were.

------- Comment #6 From Graham Forest 2003-04-27 22:09:42 0000 -------
Filtering works, yay

First Last Prev Next    No search results available      Search page      Enter new bug