From owner-freebsd-office@freebsd.org Sun Jan 29 00:59:24 2017 Return-Path: Delivered-To: freebsd-office@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2BECCBB48B for ; Sun, 29 Jan 2017 00:59:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id DBA9E1A31 for ; Sun, 29 Jan 2017 00:59:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id DAFA9CBB48A; Sun, 29 Jan 2017 00:59:24 +0000 (UTC) Delivered-To: office@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA7ADCBB489 for ; Sun, 29 Jan 2017 00:59:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B13E01A2F for ; Sun, 29 Jan 2017 00:59:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v0T0xOxv099566 for ; Sun, 29 Jan 2017 00:59:24 GMT (envelope-from bugzilla-noreply@freebsd.org) 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 Date: Sun, 29 Jan 2017 00:59:24 +0000 X-Bugzilla-Reason: CC AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: dim@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: office@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-office@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Office applications on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2017 00:59:25 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D216446 --- Comment #7 from Dimitry Andric --- 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.=