diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-07-10 11:12:04 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-07-10 19:04:37 +0200 |
commit | 115f60037409c511ae01006dedd32306ddf274ff (patch) | |
tree | 10508c2ba138656b0919fa793dbea5eccf89104a /include | |
parent | ac431b399f9fe3b772abd8fda6d0727bfa6c9135 (diff) |
tsan: ImplB3DPolygon cannot have mutable state
because it lives inside a cow_wrapper, which means multiple threads will
see inconsistent state.
WARNING: ThreadSanitizer: data race (pid=1448100)
Read of size 1 at 0x7218002d5a48 by thread T333:
0 ImplB3DPolygon::getNormal()
basegfx/source/polygon/b3dpolygon.cxx:998 (libbasegfxlo.so+0xef47a)
1 basegfx::B3DPolygon::getNormal() const
basegfx/source/polygon/b3dpolygon.cxx:1477 (libbasegfxlo.so+0xe1834)
2
drawinglayer::processor3d::DefaultProcessor3D::impRenderPolyPolygonMaterialPrimitive3D(drawinglayer::primitive3d::PolyPolygonMaterialPrimitive3D
const&) const drawinglayer/source/processor3d/defaultprocessor3d.cxx:424
(libdrawinglayerlo.so+0x1ed388)
3
drawinglayer::processor3d::DefaultProcessor3D::processBasePrimitive3D(drawinglayer::primitive3d::BasePrimitive3D
const&) drawinglayer/source/processor3d/defaultprocessor3d.cxx:531
(libdrawinglayerlo.so+0x1edb6f)
4
drawinglayer::processor3d::BaseProcessor3D::process(drawinglayer::primitive3d::Primitive3DContainer
const&) drawinglayer/source/processor3d/baseprocessor3d.cxx:57
(libdrawinglayerlo.so+0x1e91c1)
5
drawinglayer::processor3d::DefaultProcessor3D::processBasePrimitive3D(drawinglayer::primitive3d::BasePrimitive3D
const&) drawinglayer/source/processor3d/defaultprocessor3d.cxx:543
(libdrawinglayerlo.so+0x1edbe4)
6
drawinglayer::processor3d::BaseProcessor3D::process(drawinglayer::primitive3d::Primitive3DContainer
const&) drawinglayer/source/processor3d/baseprocessor3d.cxx:57
(libdrawinglayerlo.so+0x1e91c1)
7
drawinglayer::primitive2d::ScenePrimitive2D::create2DDecomposition(drawinglayer::geometry::ViewInformation2D
const&) const::Executor::doWork()
drawinglayer/source/primitive2d/sceneprimitive2d.cxx:462
(libdrawinglayerlo.so+0x12469f)
8 comphelper::ThreadTask::exec()
comphelper/source/misc/threadpool.cxx:319 (libcomphelper.so+0x2bd587)
9 comphelper::ThreadPool::ThreadWorker::execute()
comphelper/source/misc/threadpool.cxx:85 (libcomphelper.so+0x2c3930)
10 salhelper::Thread::run() salhelper/source/thread.cxx:39
(libuno_salhelpergcc3.so.3+0x5d22)
11 non-virtual thunk to salhelper::Thread::run()
salhelper/source/thread.cxx:? (libuno_salhelpergcc3.so.3+0x5ed9)
12 threadFunc include/osl/thread.hxx:189
(libuno_salhelpergcc3.so.3+0x6b1e)
13 osl_thread_start_Impl(void*) sal/osl/unx/thread.cxx:237
(libuno_sal.so.3+0xfc937)
Previous write of size 8 at 0x7218002d5a48 by thread T334:
0 operator new(unsigned long)
/home/noel/llvm-project/compiler-rt/lib/tsan/rtl/tsan_new_delete.cpp:64
(discriminator 8) (cppunittester+0x10c8a1)
1 o3tl::cow_wrapper<ImplB3DPolygon,
o3tl::ThreadSafeRefCountingPolicy>::make_unique()
include/o3tl/cow_wrapper.hxx:304 (libbasegfxlo.so+0xfe798)
2 o3tl::cow_wrapper<ImplB3DPolygon,
o3tl::ThreadSafeRefCountingPolicy>::operator->()
include/o3tl/cow_wrapper.hxx:329 (libbasegfxlo.so+0xef0e5)
3 basegfx::B3DPolygon::getNormal() const
basegfx/source/polygon/b3dpolygon.cxx:1477 (libbasegfxlo.so+0xe1825)
4
drawinglayer::processor3d::DefaultProcessor3D::impRenderPolyPolygonMaterialPrimitive3D(drawinglayer::primitive3d::PolyPolygonMaterialPrimitive3D
const&) const drawinglayer/source/processor3d/defaultprocessor3d.cxx:424
(libdrawinglayerlo.so+0x1ed388)
5
drawinglayer::processor3d::DefaultProcessor3D::processBasePrimitive3D(drawinglayer::primitive3d::BasePrimitive3D
const&) drawinglayer/source/processor3d/defaultprocessor3d.cxx:531
(libdrawinglayerlo.so+0x1edb6f)
6
drawinglayer::processor3d::BaseProcessor3D::process(drawinglayer::primitive3d::Primitive3DContainer
const&) drawinglayer/source/processor3d/baseprocessor3d.cxx:57
(libdrawinglayerlo.so+0x1e91c1)
7
drawinglayer::processor3d::DefaultProcessor3D::processBasePrimitive3D(drawinglayer::primitive3d::BasePrimitive3D
const&) drawinglayer/source/processor3d/defaultprocessor3d.cxx:543
(libdrawinglayerlo.so+0x1edbe4)
8
drawinglayer::processor3d::BaseProcessor3D::process(drawinglayer::primitive3d::Primitive3DContainer
const&) drawinglayer/source/processor3d/baseprocessor3d.cxx:57
(libdrawinglayerlo.so+0x1e91c1)
9
drawinglayer::primitive2d::ScenePrimitive2D::create2DDecomposition(drawinglayer::geometry::ViewInformation2D
const&) const::Executor::doWork()
drawinglayer/source/primitive2d/sceneprimitive2d.cxx:462
(libdrawinglayerlo.so+0x12469f)
10 comphelper::ThreadTask::exec()
comphelper/source/misc/threadpool.cxx:319 (libcomphelper.so+0x2bd587)
11 comphelper::ThreadPool::ThreadWorker::execute()
comphelper/source/misc/threadpool.cxx:85 (libcomphelper.so+0x2c3930)
12 salhelper::Thread::run() salhelper/source/thread.cxx:39
(libuno_salhelpergcc3.so.3+0x5d22)
13 non-virtual thunk to salhelper::Thread::run()
salhelper/source/thread.cxx:? (libuno_salhelpergcc3.so.3+0x5ed9)
14 threadFunc include/osl/thread.hxx:189
(libuno_salhelpergcc3.so.3+0x6b1e)
15 osl_thread_start_Impl(void*) sal/osl/unx/thread.cxx:237
(libuno_sal.so.3+0xfc937)
Change-Id: I9a12e2178cfad07f0a23b5dc4c502ce16ef92fb1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170275
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/basegfx/polygon/b3dpolygon.hxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/basegfx/polygon/b3dpolygon.hxx b/include/basegfx/polygon/b3dpolygon.hxx index 13f8ed293f59..09544766e662 100644 --- a/include/basegfx/polygon/b3dpolygon.hxx +++ b/include/basegfx/polygon/b3dpolygon.hxx @@ -76,7 +76,7 @@ namespace basegfx void clearBColors(); // Normals interface - B3DVector const & getNormal() const; // plane normal + B3DVector getNormal() const; // plane normal B3DVector const & getNormal(sal_uInt32 nIndex) const; // normal in each point void setNormal(sal_uInt32 nIndex, const B3DVector& rValue); void transformNormals(const B3DHomMatrix& rMatrix); |