[Libreoffice] [REVIEW][3-5] Prevent excessvie references to formula result tokens

Michael Meeks michael.meeks at suse.com
Tue Jan 31 04:01:46 PST 2012


On Mon, 2012-01-30 at 16:35 -0500, Kohei Yoshida wrote:
> increases its reference counter by one.  The problem is, this counter is
> unsigned 16-bit integer, and as soon as it goes above 65535 it rolls
> back to zero, and eventually the token instance gets deleted
> prematurely.

	Wow - that is annoying :-)

> As an aside, although it's not necessary for this fix, on master we
> should probably use unsigned 32-bit integer to store reference counter
> for this just to future-proof ourselves.  16-bit integer seems a bit too
> small for this purpose.

	Right - although, of course what we really want is the sexy region
based re-design, so that we don't hit the next limit: 16k cols x 1m rows
is > 4G items too ;-) so ... clearly we need to share a lot more in such
cases.

	Interesting bug though :-)

	Thanks,

		Michael

-- 
michael.meeks at suse.com  <><, Pseudo Engineer, itinerant idiot



More information about the LibreOffice mailing list