[PATCH][PUSHED] Fix for sw_filter_test crash due to ambiguous FieldEntry destructor

Caolán McNamara caolanm at redhat.com
Mon Jul 23 04:54:54 PDT 2012

On Sun, 2012-07-22 at 11:25 +0200, Kristian Rietveld wrote:
> (Please keep me on CC as I am not subscribed to the list)
> Hi all,
> I have been building LibreOffice using Clang on Mac OS X Lion again, now 
> that it is possible to get a working build using Clang on Linux.
> During the build, however, the "sw_filters_test" unit test crashes. The 
> crash happens in rtl_string_release from the FieldEntry (the one in 
> sw/source/file/ww8/ww8par.hxx) destructor. The FieldEntry destructor is 
> called through a dyld stub.
> After reading assembly code I figured that the FieldEntry destructor 
> being executed does not match the FieldEntry's fields. What was already 
> suspicious above is that rtl_string_release is being called even though 
> this FieldEntry uses OUStrings.
>  From the assembly code I guess the FieldEntry destructor being executed 
> is actually the one in registry/source/reflwrit.cxx.  So my impression 
> is that the dynamic linker on OS X is simply calling the wrong 
> destructor (the symbols have the same name).
> To fix this, I can think of either putting the WW8 FieldEntry in a 
> namespace, or renaming it to WW8FieldEntry. Since no namespaces were 
> used in the current code, I decided to rename the class.
> A patch is attached and I verified that it fixes the crashing unit test 
> for me. If people have a better or preferred way to fix this, please let 
> me know and I will update the patch accordingly.

Sounds like a similar problem to fdo#37044, fixed by
I thought that got tracked down to disabled visibility or something of
that nature. Anyway, doesn't hurt to disambiguate.


More information about the LibreOffice mailing list