calc: jumbo sheets on windows (never gonna happen)

Luboš Luňák l.lunak at collabora.com
Wed Oct 7 14:50:52 UTC 2020


On Tuesday 06 of October 2020, Noel Grandin wrote:
> Hi
>
> i.e. very large spreadsheets of up to 16 million rows.
>
> So I did some more investigation into this. In various places, we need to
> accumulate things like row-heights and other things, numbers which, with
> jumbo sheets, easily exceed 32-bits.
>
> HOWEVER
>
> All over the place, we pass these values through
> sal_uLong/sal_Long/long/unsigned long.
>
> Which is 32-bits on Windows. Doh!
>
> Honestly, the only solution I can think of (and one I confidently expect us
> to reject), is that we declare a flag day, and search and replace
> sal_Long/sal_uLong/long/unsigned long with a 64-bit type across the ENTIRE
> code base.

 Does it really need to be this extensive though? E.g. VCL should be more or 
less safe from this, I think trying any drawing with >32bit sizes is simply 
not going to work one way or another.

 Also, how realistic of a solution would be to compile with the 
undefined-behaviour sanitizer and make it fail on overflows as a way to get a 
decent enough coverage of the problematic areas?

-- 
 Luboš Luňák
 l.lunak at collabora.com


More information about the LibreOffice mailing list