Bug 17536 - bc (calculator) crashes when invoked with -l option if compiled with -Os
Bug#: 17536 Product:  Gentoo Linux Version: unspecified Platform: x86
OS/Version: Linux Status: RESOLVED Severity: critical Priority: P2
Resolution: FIXED Assigned To: bug-wranglers@gentoo.org Reported By: frbiscani@libero.it
Component: Applications
URL: 
Summary: bc (calculator) crashes when invoked with -l option if compiled with -Os
Keywords:  
Status Whiteboard: 
Opened: 2003-03-14 20:53 0000
Description:   Opened: 2003-03-14 20:53 0000
I started bc with the -l switch and then tried to calculate "5/6"; bc
segfaulted. I tried to 
recompile it with no CFLAGS, then added one optimization at a time and
recompiled it 
each time. It came out that it was the "-Os" flag which caused it to segfault.
So I just 
added "replace-flags -Os -O2" to the ebuild and so the problem was fixed (at
least in 
Gentoo...). 

Reproducible: Always
Steps to Reproduce:
1. Compile bc with -Os 
2. Fire it up with -l switch 
3. Try to calculate some decimal value (5/6, 10/3 etc.) 
Actual Results:  
segfault 

Expected Results:  
print out right result

------- Comment #1 From Seemant Kulleen (RETIRED) 2003-03-14 21:13:20 0000 -------
fixed in portage.