Issue 3468 - Copy-Paste crashes OOo Calc
Summary: Copy-Paste crashes OOo Calc
Status: CLOSED FIXED
Alias: None
Product: Calc
Classification: Application
Component: code (show other issues)
Version: 641
Hardware: PC Linux, all
: P3 Trivial (vote)
Target Milestone: ---
Assignee: Martin Hollmichel
QA Contact: issues@sc
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-03-13 15:24 UTC by gbeauche
Modified: 2003-09-08 16:55 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description gbeauche 2002-03-13 15:24:45 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>
Comment 1 niklas.nebel 2002-03-13 19:37:31 UTC
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.
Comment 2 oc 2002-03-14 09:13:24 UTC
OC=>MH: I think this one is more for you
Comment 3 Martin Hollmichel 2002-03-14 11:02:16 UTC
this seems to be an issue of compiles switches. Heiner, are we able 
to patch 'em on OO641 basis ?
Comment 4 jens-heiner.rechtien 2002-03-14 13:16:53 UTC
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.
Comment 5 jens-heiner.rechtien 2002-03-25 09:29:47 UTC
Accepted.
Comment 6 jens-heiner.rechtien 2002-04-18 19:31:01 UTC
Issue is fixed by 

solenv/inc/unxlngi4.mk rev 1.13

Heiner
Comment 7 jens-heiner.rechtien 2002-05-14 10:03:09 UTC
Reassign to mh for closing 
Comment 8 Martin Hollmichel 2002-05-21 12:29:33 UTC
scheduled for 1.0.1, in OOO_STABLE_1 branch now.
Comment 9 frank 2003-08-07 15:39:34 UTC
set to verified
Comment 10 frank 2003-08-07 15:41:20 UTC
closed verified