Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 44568 - gcc-3.3.3-r1 with USE=hardened exposes sort bug in openoffice
Summary: gcc-3.3.3-r1 with USE=hardened exposes sort bug in openoffice
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Hardened (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: The Gentoo Linux Hardened Team
Depends on:
Reported: 2004-03-13 08:52 UTC by Antony Suter
Modified: 2004-09-05 00:10 UTC (History)
1 user (show)

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


Note You need to log in before you can comment on or make changes to this bug.
Description Antony Suter 2004-03-13 08:52:30 UTC
When openoffice is built with hardened gcc, a sort function in oocalc fails. The sort function I mean is selecting a few rows of a spreadsheet, and attempt sorting by the first column. My first compile of openoffice without hardened gcc does not show the problem.

Circumstancial evidence from the past makes me think the -fstack-protector flag is at fault, as I began using that flag for a few weeks before I moved up to:
(emerge hardened-gcc; gcc -A) # oocalc sort fails
(emerge -C hardened-gcc ; USE="hardened" emerge gcc-3.3.3-r1.ebuild)  # oocalc sort fails

I have now built a gcc-3.3.3 with the ProPolice patch disabled in my overlay, and built openoffice-1.1.0-r3. (I do realise I only needed to emerge gcc-3.3.3 and not add -fstack-protector to my CFLAGS...) The oocalc sort bug has disappeared.

Reproducible: Always
Steps to Reproduce:
1. build openoffice, using an activated hardened gcc
2. select a few rows of your nearest spreadsheet
3. attempt to sort by first column

Actual Results:  
oocalc immediatly exits. next invocation of oocalc allows me to recover the
unsaved spreadsheet I was working on.

Expected Results:  
sorted the selected rows of my spreadsheet.

My computer is an Athlon-XP 2500+ with 1 GB RAM.

Gentoo Base System version
Portage 2.0.50-r1 (selinux-x86-1.4, gcc-3.3.3,
glibc-2.3.2-r9,2.3.3_pre20040207-r0, 2.6.3-mm3-as056)
System uname: 2.6.3-mm3-as056 i686 AMD Athlon(tm) XP
distcc 2.12.1 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
Autoconf: sys-devel/autoconf-2.58-r1,sys-devel/autoconf-2.57-r1
Automake: sys-devel/automake-1.7.7,sys-devel/automake-1.8.2
CFLAGS="-march=athlon-xp -mfpmath=387 -O2 -fomit-frame-pointer -ffast-math
-fexpensive-optimizations -pipe -frename-registers -ftracer"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref
/usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-xp -mfpmath=387 -O2 -fomit-frame-pointer -ffast-math
-fexpensive-optimizations -pipe -frename-registers -ftracer"
FEATURES="autoaddcvs ccache loadpolicy sandbox sfperms strict userpriv usersandbox"
USE="X alsa apm avi berkdb bonobo composite crypt cups doc dvd encode esd
foomaticdb gd gdbm gif gnome gphoto2 gpm gtk gtk2 gtkhtml guile imlib ipv6 jack
java jikes joystick jpeg ladcca libg++ libwww mad matroska mikmod motif mozilla
moznoirc moznomail mozsvg mpeg mysql ncurses nls nptl oav odbc oggvorbis openal
opengl oss pam pdflib perl png postgres python qt quicktime readline samba sdl
selinux slang spell sse ssl tcltk tcpd tiff truetype usb wxwindows x86 xfs
xinerama xml2 xmms xv zlib"
Comment 1 solar (RETIRED) gentoo-dev 2004-04-19 00:34:19 UTC
Thanks for the detailed bug report but you complelt yfailed to follow 
instructions as I noted in the email announcment.

Q) I found a bug what should I do?
A) Fix the bug and send me a patch.

Reporting bugs for a package masked pkgs puts an unfair ammount of work 
load on our bugwranglers.

Now what you should do...  start the program from the command line and
tell us if you get a smash stack killed msg in some function(). If so..
then try adding filter-flags -fstack-protector in the src_compile()
function of the the .ebuild If that works great sorta... Still tells
there is a linear stack overflow in this program.
Comment 2 solar (RETIRED) gentoo-dev 2004-04-25 20:02:04 UTC

Have you had a chance to test and rebuild(if needed) this app with the 
instructions I provided?
Comment 3 solar (RETIRED) gentoo-dev 2004-09-05 00:10:21 UTC
User failed follow up on bug. 
Closing bug now a WONTFIX