Date: Sun, 29 Jan 2017 00:59:24 +0000 From: bugzilla-noreply@freebsd.org To: office@FreeBSD.org Subject: [Bug 216446] editors/libreoffice: sfx2_classification test crashes during build with clang/libc++ 4.0 Message-ID: <bug-216446-25061-NIclUDQIbl@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-216446-25061@https.bugs.freebsd.org/bugzilla/> References: <bug-216446-25061@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D216446 --- Comment #7 from Dimitry Andric <dim@FreeBSD.org> --- Created attachment 179388 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D179388&action= =3Dedit Fix libreoffice's sfx2_classification unit test Here is a patch that fixes the sfx2_classification unit test, at least for = me. The resulting libreoffice installs and runs OK, at least with some light testing. I am not completely sure why this fix works though. My suspicion is that t= he reference returned from pDocShell->getDocProperties() is a temporary object, which gets passed to a SfxClassificationHelper object, but it is destroyed = or invalidated before it is being accessed in SfxClassificationHelper. By sto= ring the return value from pDocShell->getDocProperties() in a local object, the destruction or invalidation is postponed to the end of the SwEditShell::SetClassification() function. There are a few other places in the source where this pattern is repeated, = in some cases storing the getDocProperties() result in a local object, in other cases directly passing it to another constructor, so there is not much consistency. Somebody who understands libreoffice's class structure and object reference mechanism better should attempt to explain this more coherently. Until that moment, this patch seems to do the trick... --=20 You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-216446-25061-NIclUDQIbl>