incubator-ooo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Herbert Duerr <...@apache.org>
Subject Re: vcl field.cxx issue 150733 invalid float operation
Date Fri, 13 Jul 2012 08:39:23 GMT
Hi Yuri,

On 12.07.2012 17:50, Yuri Dario wrote:
> I finally discovered the cause of a strange crash on some pc for the
> os2 port. It is due to an invalid float operation in MetricField
> class. It seems that some CPU are processing some invalid float value,
> which in turn generates the exception.
> [...]
> but issue 150733 is not existing in current bugzilla database. I think
> it is an internal staroffice/sun/oracle issue.

Yes. Unfortunately that old database is gone for good.

> Do someone know how has it been resolved?

It has been resolved using the rtl::math::isFinite() check which in turn 
uses the SAL_MATH_FINITE macro which is interestingly defined in a 
platform-dependent way in main/sal/inc/sal/mathconf.h

What may be a problem is that the way the macro is defined for OS/2 it 
does not reliably work if it is called via the rtl::math::isFinite() 
function, because then the sizeof(type) magic fails.

Does it help if you replace the call to that inline method isFinite() to 
the macro SAL_MATH_FINITE()?

> This bug is present when users show the page settings dialog to select
> margins and page size. Since it happens when very big numbers are used
> forI found a workaround using
>
>      mnMax               = 0x00000000FFFFFFFFLL;
>
> as initializer in void NumericFormatter::ImplInit()

This sounds like a reasonable plan-B though I'm a bit worried to limit 
the value to 32bit because it was defined as 64bit for a reason.

Herbert

Mime
View raw message