From d5cb1c694cb52e83781363d292a6d2d80fbd9c51 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 7 Nov 2019 13:08:29 +0100 Subject: Looks like UBSan still needs various RTTI for some reason After 5d7af3c38b618d438e065da9d90668e7c4baa849 "make some classes module-private" various tests in my Linux ASan+UBSan build failed due to missing symbols. Identified the problematic types with > make check screenshot gb_SUPPRESS_TESTS=x && for i in $(find instdir/program workdir/LinkTarget/CppunitTest -type f); do LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}instdir/program:workdir/UnpackedTarball/cppunit/src/cppunit/.libs ldd -r "$i" 2>/dev/null | grep 'undefined symbol: _ZTI'; done and fixed the ensuing > sw/source/core/SwNumberTree/SwNodeNum.cxx:190:32: error: dynamic_cast from 'SwNumberTreeNode' with hidden type visibility to 'SwNodeNum' with default type visibility [loplugin:dyncastvisibility] > SwNodeNum* pChild( dynamic_cast(pNode) ); > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > sw/inc/SwNumberTree.hxx:114:7: note: base class 'SwNumberTreeNode' with hidden type visibility defined here [loplugin:dyncastvisibility] > class SwNumberTreeNode > ~~~~~~^~~~~~~~~~~~~~~~ > sw/inc/SwNodeNum.hxx:29:26: note: derived class 'SwNodeNum' with default type visibility defined here [loplugin:dyncastvisibility] > class SAL_DLLPUBLIC_RTTI SwNodeNum : public SwNumberTreeNode > ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fallout. Change-Id: I7abafdb4d02216e1a047f886d5e72ad3420115ce Reviewed-on: https://gerrit.libreoffice.org/82210 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- include/vcl/salnativewidgets.hxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'include/vcl/salnativewidgets.hxx') diff --git a/include/vcl/salnativewidgets.hxx b/include/vcl/salnativewidgets.hxx index 47ff2c8ee7ce..4ae64ace4602 100644 --- a/include/vcl/salnativewidgets.hxx +++ b/include/vcl/salnativewidgets.hxx @@ -289,7 +289,7 @@ class VCL_DLLPUBLIC ImplControlValue * * Value container for scrollbars. */ -class ScrollbarValue final : public ImplControlValue +class SAL_DLLPUBLIC_RTTI ScrollbarValue final : public ImplControlValue { public: long mnMin; @@ -319,7 +319,7 @@ class ScrollbarValue final : public ImplControlValue ScrollbarValue & operator =(ScrollbarValue &&) = delete; // due to ImplControlValue }; -class SliderValue final : public ImplControlValue +class SAL_DLLPUBLIC_RTTI SliderValue final : public ImplControlValue { public: long mnMin; @@ -383,7 +383,7 @@ namespace o3tl template<> struct typed_flags : is_typed_flags {}; } -class TabitemValue final : public ImplControlValue +class SAL_DLLPUBLIC_RTTI TabitemValue final : public ImplControlValue { public: TabitemFlags mnAlignment; @@ -418,7 +418,7 @@ class TabitemValue final : public ImplControlValue * Note: the other parameters of DrawNativeControl will have no meaning * all parameters for spinbuttons are carried here */ -class SpinbuttonValue final : public ImplControlValue +class SAL_DLLPUBLIC_RTTI SpinbuttonValue final : public ImplControlValue { public: tools::Rectangle maUpperRect; @@ -491,7 +491,7 @@ public: * Value container for menu items; specifies the rectangle for the whole item which * may be useful when drawing parts with a smaller rectangle. */ -class MenupopupValue final : public ImplControlValue +class SAL_DLLPUBLIC_RTTI MenupopupValue final : public ImplControlValue { public: MenupopupValue( long i_nGutterWidth, const tools::Rectangle& i_rItemRect ) -- cgit