summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-05-10 08:05:41 +0200
committerStephan Bergmann <sbergman@redhat.com>2022-05-10 09:32:22 +0200
commitf522000d15614f854c60338c244b78ed2c6f364c (patch)
tree484b52128be691122fd7dd4bbeaf975d28e501ca /svx
parentcf650ceaafb4d3a3f46991dc1b12efa0e37a71f9 (diff)
Fix stack-use-after-scope
...during CppunitTest_chart2_export, > [_RUN_____] testStrict::Load_Verify_Reload_Verify [...] > ==20402==ERROR: AddressSanitizer: stack-use-after-scope on address 0x7f220d8280d0 at pc 0x7f21a71c55cb bp 0x7ffc70fff650 sp 0x7ffc70fff648 > READ of size 8 at 0x7f220d8280d0 thread T0 > #0 0x7f21a71c55ca in sdr::contact::ViewObjectContact::getPrimitive2DSequence(sdr::contact::DisplayInfo const&) const /svx/source/sdr/contact/viewobjectcontact.cxx:361:22 > #1 0x7f21a71c440f in sdr::contact::ViewObjectContact::getObjectRange() const /svx/source/sdr/contact/viewobjectcontact.cxx:199:78 > #2 0x7f21a71c33f7 in sdr::contact::ViewObjectContact::~ViewObjectContact() /svx/source/sdr/contact/viewobjectcontact.cxx:165:9 > #3 0x7f21a71d0af8 in sdr::contact::ViewObjectContactOfSdrObj::~ViewObjectContactOfSdrObj() /svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx:51:1 > #4 0x7f21a70b6d08 in sdr::contact::ViewObjectContactOfGroup::~ViewObjectContactOfGroup() /svx/source/sdr/contact/viewobjectcontactofgroup.cxx:40:9 > #5 0x7f21a70b6d58 in sdr::contact::ViewObjectContactOfGroup::~ViewObjectContactOfGroup() /svx/source/sdr/contact/viewobjectcontactofgroup.cxx:39:9 > #6 0x7f21a71315e1 in sdr::contact::ObjectContact::~ObjectContact() /svx/source/sdr/contact/objectcontact.cxx:68:9 > #7 0x7f21a71e7108 in sdr::contact::ObjectContactPainter::~ObjectContactPainter() /svx/source/sdr/contact/objectcontactofobjlistpainter.cxx:43:1 > #8 0x7f21a71e77fc in sdr::contact::ObjectContactOfObjListPainter::~ObjectContactOfObjListPainter() /svx/source/sdr/contact/objectcontactofobjlistpainter.cxx:69:1 > #9 0x7f21a89793c1 in (anonymous namespace)::GraphicExporter::GetGraphic((anonymous namespace)::ExportSettings const&, Graphic&, bool) /svx/source/unodraw/UnoGraphicExporter.cxx:959:13 [...] > Address 0x7f220d8280d0 is located in stack of thread T0 at offset 4304 in frame > #0 0x7f21a896d04f in (anonymous namespace)::GraphicExporter::GetGraphic((anonymous namespace)::ExportSettings const&, Graphic&, bool) /svx/source/unodraw/UnoGraphicExporter.cxx:592 > > This frame has 89 object(s): [...] > [4304, 4320) 'aCheckVisibilityRedirector' (line 955) <== Memory access at offset 4304 is inside this variable (<https://ci.libreoffice.org/job/lo_ubsan/2394/>), presumably since db6c5c7f9dddd81a8f18a74d6051555680837adc "svx: calculate object range before using it" Change-Id: I77d56be1ca6bf16a0f5aa65cc1130547ae2fbf04 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134103 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/unodraw/UnoGraphicExporter.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx
index 3b525789468f..0cc43ce701f3 100644
--- a/svx/source/unodraw/UnoGraphicExporter.cxx
+++ b/svx/source/unodraw/UnoGraphicExporter.cxx
@@ -951,8 +951,8 @@ bool GraphicExporter::GetGraphic( ExportSettings const & rSettings, Graphic& aGr
{
// more effective way to paint a vector of SdrObjects. Hand over the processed page
// to have it in the
- sdr::contact::ObjectContactOfObjListPainter aMultiObjectPainter(*aOut, std::move(aShapes), mpCurrentPage);
ImplExportCheckVisisbilityRedirector aCheckVisibilityRedirector(mpCurrentPage);
+ sdr::contact::ObjectContactOfObjListPainter aMultiObjectPainter(*aOut, std::move(aShapes), mpCurrentPage);
aMultiObjectPainter.SetViewObjectContactRedirector(&aCheckVisibilityRedirector);
aMultiObjectPainter.ProcessDisplay(aDisplayInfo);