Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 17536 - bc (calculator) crashes when invoked with -l option if compiled with -Os
Summary: bc (calculator) crashes when invoked with -l option if compiled with -Os
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High critical (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-14 20:53 UTC by frank
Modified: 2003-03-14 21:13 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description frank 2003-03-14 20:53:04 UTC
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 Seemant Kulleen (RETIRED) gentoo-dev 2003-03-14 21:13:20 UTC
fixed in portage.