[Libreoffice-commits] update string copy semantics to be undefined in a non-crashing way

Michael Meeks michael.meeks at suse.com
Thu Oct 4 05:48:15 PDT 2012

On Thu, 2012-10-04 at 11:34 +0200, Stephan Bergmann wrote:
> Given that "it is an error for X to happen" and "if X happens, behaviour 
> is undefined" have exactly the same meaning (at least in my 
> understanding of computing), I wonder whether this is just a harmless 
> rephrasing, or whether there is a deeper misunderstanding lurking there.

	Well - there was a very complicated semantic discussion in the ESC that
I must confess I didn't fully grasp the import of. This patch was the

> > +    {
> > +        OSL_FAIL( "Out of bounds substring access" );
> New code should use SAL_WARN, please.  (Arguably, it should rather use 
> abort.  Which would also make the following code moot.)

	The arguably bit was near the crux of the discussion - IIRC it was
decided that aborting was not a great idea - we have enough odd
corner-case bugs crawling out of the woodwork just now. The SAL_WARN
thing sounds sensible - I'd really appreciate it if someone that
understands the full set of all the warn / log variant macros, and also
likes using stream operators could work out how to print something more
meaningful about the error :-) preferably un-conditionally - so no
environment variable is needed etc. [ is that a SAL_WARN? ].

> Oh, what should have been a linear list of versions turned into a 
> multi-pronged fork starting with LIBO_UDK_3.5.  Fixed that now for 
> LIBO_UDK_3.7 at least.

	Heh ;-) great. I copied the existing pattern, odd as it looked; thanks
for fixing.



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

More information about the LibreOffice mailing list