Apache OpenOffice (AOO) Bugzilla – Issue 3468
Copy-Paste crashes OOo Calc
Last modified: 2003-09-08 16:55:29 UTC
OpenOffice.org 641c built from sources with gcc-3.0.4 on Ix86 Optimization level was set to -O2 Steps to reproduce: - Launch OOo Calc component - Type in some text in one cell - Try to copy (<ctrl>-C), OOo will crash One solution: Add -fno-strict-aliasing to compilation flags Further notes: For any gcc >= "2.96", strict aliasing is enabled by default at -O2 level whereas it is user enabled in 2.95.X. Therefore, you could probably reproduce that bug if you were to build OOo with -O2 -fstrict-aliasing and gcc-2.95.X. This bug is absent from Sun's provided binaries because of -O1 optimization level used in the build. This bug *might* exhaust some error in the source that breaks aliasing rules. That could be a compiler bug too. The former is more likely since most nowadays applications are fine with strict aliasing rules. <http://gcc.gnu.org/onlinedocs/gcc-3.0.4/gcc_3.html#IDX337>
Some notes on that: We identified the class ScAddress (from sc/inc/global.hxx) as one cause of optimization problems with gcc 3, but there may be others. Eike filed a gcc bug (4922), which was closed because the sample code (which was from ScAddress) doesn't obey aliasing rules. We haven't yet tried if a build with -O2 and -fno-strict-aliasing still has any problems that -O1 doesn't have.
OC=>MH: I think this one is more for you
this seems to be an issue of compiles switches. Heiner, are we able to patch 'em on OO641 basis ?
We'll have to use either "-O2 -fno-strict-aliasing" or "-O1" and recompile everything. I doubt that ScAdress is the only place in the office where we violate the aliasing rules. I suggest that we use the first one to utilize the other level 2 optimizations. And yes, it's possible to change the optimization flag in OO641. It should work with both gcc 2.95.x and gcc 3.x compilers.
Accepted.
Issue is fixed by solenv/inc/unxlngi4.mk rev 1.13 Heiner
Reassign to mh for closing
scheduled for 1.0.1, in OOO_STABLE_1 branch now.
set to verified
closed verified