summaryrefslogtreecommitdiff
path: root/external/cairo
AgeCommit message (Collapse)Author
2024-08-27MSAN: Use-of-uninitialized-valueCaolán McNamara
==10765==WARNING: MemorySanitizer: use-of-uninitialized-value #0 0x5a74216f620b in _cairo_path_fixed_fill_rectilinear_tessellate_to_boxes workdir/UnpackedTarball/cairo/src/cairo-path-fill.c:288:5 #1 0x5a74216f620b in _cairo_path_fixed_fill_rectilinear_to_boxes workdir/UnpackedTarball/cairo/src/cairo-path-fill.c:345:12 #2 0x5a7421735497 in _cairo_spans_compositor_fill workdir/UnpackedTarball/cairo/src/cairo-spans-compositor.c:1121:11 num_limits is 0 here so this is apparently cosmetic Change-Id: Ib07259ce653414c9381c800355a648ab025d1919 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172457 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-05-07cool#7015 fix rgba emojisCaolán McNamara
We initially added this for android so we could match the OpenGL GL_RGBA layout available there. Later we made it available for all platforms via --enable-cairo-rgba which is useful for the kit case. But along the line color emoji support was added to cairo which wasn't present at the time of the original patch, so now capture those uses as well. https: //github.com/CollaboraOnline/online/issues/7015 Change-Id: I6039607a46a58a7e9cbf5c052e6fb34234fd19b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167225 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-05-06makefile simplification: replace $(call gb_UnpackedTarball_get_dir,foo)Christian Lohmaier
…by a simple/static $(gb_UnpackedTarball_workdir)/foo see also 0c4c84a14b01c71c76a9c45a7f26aec4d64f3e4f Change-Id: I8e6aa55c85534c4446556548910c950ddbe7c6fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167163 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Jenkins
2023-10-16Silence UBSan misaligned-pointer-useStephan Bergmann
...as seen during CppunitTest_sd_import_tests2, > pixman-sse2.c:522:16: runtime error: load of misaligned address 0x5170000a4f83 for type 'const uint32_t *' (aka 'const unsigned int *'), which requires 4 byte alignment > 0x5170000a4f83: note: pointer points here > 00 b8 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff c0 00 b8 ff ff ff ff ff ff > ^ > #0 in combine1 at workdir/UnpackedTarball/pixman/pixman/pixman-sse2.c:522:5 > #1 in sse2_combine_add_u at workdir/UnpackedTarball/pixman/pixman/pixman-sse2.c:1366:6 > #2 in sse2_composite_add_8_8 at workdir/UnpackedTarball/pixman/pixman/pixman-sse2.c:4490:2 > #3 in add_glyphs at workdir/UnpackedTarball/pixman/pixman/pixman-glyph.c:615:6 > #4 in pixman_composite_glyphs at workdir/UnpackedTarball/pixman/pixman/pixman-glyph.c:673:5 > #5 in composite_glyphs at workdir/UnpackedTarball/cairo/src/cairo-image-compositor.c:941:2 > #6 in composite_glyphs at workdir/UnpackedTarball/cairo/src/cairo-traps-compositor.c:2295:12 > #7 in clip_and_composite at workdir/UnpackedTarball/cairo/src/cairo-traps-compositor.c:1049:15 > #8 in _cairo_traps_compositor_glyphs at workdir/UnpackedTarball/cairo/src/cairo-traps-compositor.c:2331:11 > #9 in _cairo_compositor_glyphs at workdir/UnpackedTarball/cairo/src/cairo-compositor.c:292:11 > #10 in _cairo_image_surface_glyphs at workdir/UnpackedTarball/cairo/src/cairo-image-surface.c:1030:12 > #11 in _cairo_surface_show_text_glyphs at workdir/UnpackedTarball/cairo/src/cairo-surface.c:2920:15 > #12 in _cairo_gstate_show_text_glyphs at workdir/UnpackedTarball/cairo/src/cairo-gstate.c:2077:15 > #13 in _cairo_default_context_glyphs at workdir/UnpackedTarball/cairo/src/cairo-default-context.c:1334:12 > #14 in cairo_show_glyphs at workdir/UnpackedTarball/cairo/src/cairo.c:3670:14 > #15 in CairoTextRender::DrawTextLayout(GenericSalLayout const&, SalGraphics const&) at vcl/unx/generic/gdi/cairotextrender.cxx:476:9 > #16 in SvpSalGraphics::DrawTextLayout(GenericSalLayout const&) at vcl/headless/svptext.cxx:72:23 > #17 in GenericSalLayout::DrawText(SalGraphics&) const at vcl/source/gdi/CommonSalLayout.cxx:171:18 > #18 in OutputDevice::ImplDrawTextDirect(SalLayout&, bool) at vcl/source/outdev/text.cxx:331:16 > #19 in OutputDevice::ImplDrawText(SalLayout&) at vcl/source/outdev/text.cxx:482:9 > #20 in OutputDevice::DrawTextArray(Point const&, rtl::OUString const&, KernArraySpan, std::span<unsigned char const, 18446744073709551615ul>, int, int, SalLayoutFlags, SalLayoutGlyphs const*) at vcl/source/outdev/text.cxx:951:9 > #21 in drawinglayer::processor2d::VclProcessor2D::RenderTextSimpleOrDecoratedPortionPrimitive2D(drawinglayer::primitive2d::TextSimplePortionPrimitive2D const&) at drawinglayer/source/processor2d/vclprocessor2d.cxx:422:33 > #22 in drawinglayer::processor2d::VclPixelProcessor2D::processTextSimplePortionPrimitive2D(drawinglayer::primitive2d::TextSimplePortionPrimitive2D const&) at drawinglayer/source/processor2d/vclpixelprocessor2d.cxx:404:9 > #23 in drawinglayer::processor2d::VclPixelProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/vclpixelprocessor2d.cxx:200:13 > #24 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21 > #25 in drawinglayer::processor2d::BaseProcessor2D::visit(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:56:13 > #26 in drawinglayer::primitive2d::GroupPrimitive2D::getChildren(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&) const at include/drawinglayer/primitive2d/groupprimitive2d.hxx:76:90 > #27 in drawinglayer::primitive2d::GroupPrimitive2D::get2DDecomposition(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&, drawinglayer::geometry::ViewInformation2D const&) const at drawinglayer/source/primitive2d/groupprimitive2d.cxx:53:13 > #28 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:46:24 > #29 in drawinglayer::processor2d::VclPixelProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/vclpixelprocessor2d.cxx:378:13 > #30 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21 > #31 in drawinglayer::processor2d::BaseProcessor2D::visit(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:56:13 > #32 in drawinglayer::primitive2d::GroupPrimitive2D::getChildren(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&) const at include/drawinglayer/primitive2d/groupprimitive2d.hxx:76:90 > #33 in drawinglayer::primitive2d::GroupPrimitive2D::get2DDecomposition(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&, drawinglayer::geometry::ViewInformation2D const&) const at drawinglayer/source/primitive2d/groupprimitive2d.cxx:53:13 > #34 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:46:24 > #35 in drawinglayer::processor2d::VclPixelProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/vclpixelprocessor2d.cxx:378:13 > #36 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21 > #37 in drawinglayer::processor2d::BaseProcessor2D::visit(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:56:13 > #38 in drawinglayer::primitive2d::GroupPrimitive2D::getChildren(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&) const at include/drawinglayer/primitive2d/groupprimitive2d.hxx:76:90 > #39 in drawinglayer::primitive2d::GroupPrimitive2D::get2DDecomposition(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&, drawinglayer::geometry::ViewInformation2D const&) const at drawinglayer/source/primitive2d/groupprimitive2d.cxx:53:13 > #40 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:46:24 > #41 in drawinglayer::processor2d::VclPixelProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/vclpixelprocessor2d.cxx:378:13 > #42 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21 > #43 in drawinglayer::processor2d::BaseProcessor2D::visit(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:56:13 > #44 in drawinglayer::primitive2d::BufferedDecompositionPrimitive2D::get2DDecomposition(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&, drawinglayer::geometry::ViewInformation2D const&) const at drawinglayer/source/primitive2d/BufferedDecompositionPrimitive2D.cxx:41:14 > #45 in drawinglayer::primitive2d::SdrTextPrimitive2D::get2DDecomposition(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&, drawinglayer::geometry::ViewInformation2D const&) const at svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx:235:47 > #46 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:46:24 > #47 in drawinglayer::processor2d::VclPixelProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/vclpixelprocessor2d.cxx:378:13 > #48 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21 > #49 in drawinglayer::processor2d::BaseProcessor2D::visit(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:56:13 > #50 in drawinglayer::primitive2d::BufferedDecompositionPrimitive2D::get2DDecomposition(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&, drawinglayer::geometry::ViewInformation2D const&) const at drawinglayer/source/primitive2d/BufferedDecompositionPrimitive2D.cxx:41:14 > #51 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:46:24 > #52 in drawinglayer::processor2d::VclPixelProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/vclpixelprocessor2d.cxx:378:13 > #53 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21 > #54 in sdr::contact::ObjectContactOfPageView::DoProcessDisplay(sdr::contact::DisplayInfo&) at svx/source/sdr/contact/objectcontactofpageview.cxx:279:31 > #55 in sdr::contact::ObjectContactOfPageView::ProcessDisplay(sdr::contact::DisplayInfo&) at svx/source/sdr/contact/objectcontactofpageview.cxx:117:21 > #56 in SdrPageWindow::RedrawAll(sdr::contact::ViewObjectContactRedirector*) at svx/source/svdraw/sdrpagewindow.cxx:354:28 > #57 in SdrPageView::CompleteRedraw(SdrPaintWindow&, vcl::Region const&, sdr::contact::ViewObjectContactRedirector*) at svx/source/svdraw/svdpagv.cxx:239:18 > #58 in SdrPaintView::DoCompleteRedraw(SdrPaintWindow&, vcl::Region const&, sdr::contact::ViewObjectContactRedirector*) at svx/source/svdraw/svdpntv.cxx:610:21 > #59 in SdrPaintView::CompleteRedraw(OutputDevice*, vcl::Region const&, sdr::contact::ViewObjectContactRedirector*) at svx/source/svdraw/svdpntv.cxx:523:5 > #60 in sd::View::CompleteRedraw(OutputDevice*, vcl::Region const&, sdr::contact::ViewObjectContactRedirector*) at sd/source/ui/view/sdview.cxx:498:17 > #61 in sd::DrawView::CompleteRedraw(OutputDevice*, vcl::Region const&, sdr::contact::ViewObjectContactRedirector*) at sd/source/ui/view/drawview.cxx:517:17 > #62 in sd::DrawDocShell::Draw(OutputDevice*, JobSetup const&, unsigned short, bool) at sd/source/ui/docshell/docshel2.cxx:112:12 > #63 in SfxObjectShell::DoDraw_Impl(OutputDevice*, Point const&, Fraction const&, Fraction const&, JobSetup const&, unsigned short, bool) at sfx2/source/doc/objembed.cxx:204:5 > #64 in SfxObjectShell::DoDraw(OutputDevice*, Point const&, Size const&, JobSetup const&, unsigned short, bool) at sfx2/source/doc/objembed.cxx:151:9 > #65 in SfxObjectShell::CreatePreview_Impl(bool, VirtualDevice*, GDIMetaFile*) const at sfx2/source/doc/objcont.cxx:197:40 > #66 in SfxObjectShell::GetPreviewBitmap() const at sfx2/source/doc/objcont.cxx:109:9 > #67 in SfxObjectShell::WriteThumbnail(bool, com::sun::star::uno::Reference<com::sun::star::io::XStream> const&) at sfx2/source/doc/objstor.cxx:3738:31 > #68 in SfxObjectShell::GenerateAndStoreThumbnail(bool, com::sun::star::uno::Reference<com::sun::star::embed::XStorage> const&) at sfx2/source/doc/objstor.cxx:3696:33 > #69 in SfxObjectShell::SaveTo_Impl(SfxMedium&, SfxItemSet const*) at sfx2/source/doc/objstor.cxx:1469:19 > #70 in SfxObjectShell::PreDoSaveAs_Impl(rtl::OUString const&, rtl::OUString const&, SfxItemSet const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/objstor.cxx:2992:39 > #71 in SfxObjectShell::CommonSaveAs_Impl(INetURLObject const&, rtl::OUString const&, SfxItemSet&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/objstor.cxx:2782:9 > #72 in SfxObjectShell::APISaveAs_Impl(std::basic_string_view<char16_t, std::char_traits<char16_t>>, SfxItemSet&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/objserv.cxx:319:19 > #73 in SfxBaseModel::impl_store(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, bool) at sfx2/source/doc/sfxbasemodel.cxx:3191:42 > #74 in SfxBaseModel::storeToURL(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/sfxbasemodel.cxx:1801:13 > #75 in UnoApiTest::saveWithParams(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at test/source/unoapi_test.cxx:213:16 > #76 in UnoApiTest::save(rtl::OUString const&, char const*) at test/source/unoapi_test.cxx:178:5 > #77 in UnoApiTest::saveAndReload(rtl::OUString const&, char const*) at test/source/unoapi_test.cxx:218:5 > #78 in testOverflowBehaviorClip::TestBody() at sd/qa/unit/import-tests2.cxx:1899:5 Change-Id: Iea3e107608137c4dec9103ee0b04e801284b5fa9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158018 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-09-15A more principled suppression of -fsanitize=function in external C codeStephan Bergmann
...after <https://github.com/llvm/llvm-project/commit/279a4d0d67c874e80c171666822f2fabdd6fa926> "-fsanitize=function: support C". This includes reverts of 16af9e81863a80116f808ee3cfa4a1bab7c67ac5 "update clang asan suppressions" and 151a43f3d00f6523079c53d6c2d064f80b9a55d6 ""update clang asan suppressions". Change-Id: I49740f5f3a784af1d62b830b47bfdfa27fe3e471 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156935 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-07-06cairo RGBA needs to take account of custom RGB24_888 formatCaolán McNamara
Change-Id: I929d20f134c4fb7dedfd2c581263c303cae87eea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154080 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-06-27add an --enable-cairo-rgba to set the order of pixels for internal cairoCaolán McNamara
Change-Id: Ieab2ef59f63a7722bffea3273d2eeefadef47b56 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153628 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-05-17ofz#57493 reduce num_edges required to triggerCaolán McNamara
Change-Id: Idb6127d8943dbf62d8cacb7f2f5382a1e8619aae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151869 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-05-11ofz#57493 Timeout in _cairo_bo_event_queue_sort with > 200000 edgesCaolán McNamara
Change-Id: Id925da604647973977c25bbbfa57b1a69382e063 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151665 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-02-27It seems to work to compile also the MMX code for WASMTor Lillqvist
Change-Id: I27b56297a07e248102cae1bee4074b7be422ce23 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147875 Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2023-02-13Only package the external/cairo library that is named the same as the SONAMEStephan Bergmann
Change-Id: Id97fe380c3e3976e56a6962eaebfbd696bab7332 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146908 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-02-09Use SIMD in pixman for WASMTor Lillqvist
Emscripten and WASM do have some support for SSSE3, so let's try to use it, with -msimd128. See https://emscripten.org/docs/porting/simd.html. WASM is not x86, though, so avoid use of inline x86 assembly, like the CPUID instruction. Emscripten does not have <mmintrin.h> but does have <xmmintrin.h>, <emmintrin.h>, and <tmmintrin.h>. Change-Id: Ic3a47291f6c6dee6843e93ccecc92a643b269cb1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146691 Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2023-02-09Enable opening of downloaded fonts only in ForKit in OnlineTor Lillqvist
We want that only the ForKit process needs to have access to new font files added to a Collabora Online instance dynamically by downloading from a server. There are however many locations in the Kit process, in core and in external libraries like harfbuzz, where the code wants to open a font file. Handle this so that the ForKit process opens such a downloaded font file and doesn't close it. The file descriptor is thus inherited by Kit processes. The font file pathname passed on to other code is a fake on in the format "/:FD:/%d" where the %d is the file descriptor of the opened font file. Add checks in all places where font files are opened, look for this special pathname format, and modify the code to just dup() the already open file descriptor in that case. All this is relevant for Linux only, as Collabora Online runs on Linux. Do the above for harfbuzz, cairo, fontconfig, and freetype. In addition make sure that these libraries (except harfbuzz which needs to be a static library and freetype) when bundled, on Linux, are built as shared libraries, and won't be confused with the corresponding system libraries by making sure their sonames are different. Change-Id: Ib059cb27e1637d07bb709249abd0d984f948caa9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140714 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146341 Tested-by: Jenkins
2023-01-23Enforce compiling cairo and pixman for WASM with -O3Tor Lillqvist
Earlier, no -O flag at all got used in the cairo and pixman builds. Which was sad, as these two libraries are performance-critical. Yes, this change is quick-and-dirty. The proper way would be to modify things in solenv/gbuild. But that is somewhat complicated. In general it seems fairly hard to make sure the same compiler flags get used for every external bundled library. Each external library is a special snowflake, more or less, with a differently structured ExternalProject makefile. For instance for the libwpd library (just picked randomly as an example), even -O2 gets used. (Which as such is OK.) This despite solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk apparently trying to enforce use of -O1 for Emscripten. This change has a visible impact on the performance of COWASM. Change-Id: I99d74db2da733134fde16661881856f9a81100f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146009 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2022-11-30if we --disable-arm-neon then also use the new --disable-arm-a64-neonCaolán McNamara
alternatively -fno-integrated-as is a suggestion at https://gitlab.freedesktop.org/pixman/pixman/-/issues/45 Change-Id: I9b16d235d24f3d0a87507bdd0c6d5d397ac45d91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143481 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-29pixman: upgrade to release 0.42.2Taichi Haradaguchi
Fixes CVE-2022-44638 Remove Wincompatible-function-pointer-types.patch.0, fixed upstream. Change-Id: If6589a701a252f71da145264ee3a6f0e333492ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143423 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-11-29Don't use pthread for cairoThorsten Behrens
For cross builds, odd cases of cairo configure picking up wrong librt and then missing pthread functions - so lets just disable it, we're not using cairo multi-threaded anyway. Change-Id: Id8b6426203859e7bf082d71ad8cf4548928d6acc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143390 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2022-09-02external/cairo: Remove dead code from cairo.RGB24_888.patchStephan Bergmann
...now that ab157ab93e0c5a62927947a8d2b0c1c277e526ac "move part of sanitizer patch to the patch that introduced the problem" unilaterally folded in here the content of f5e1314ffa564077c27fb9c954c792b498bcae12 "external/cairo: Fix previous -fsanitize=alignment fix", about which that commit's message had stated: "The following line > pixel &= 0x00ffffff; /* ignore next pixel bits */ should no longer be necessary now, and it is probably better to directly fix the original code in external/cairo/cairo/cairo-1.10.2.patch, but I'll leave that for a potential follow-up fix, once the provenance and assumed quality of that original CAIRO_FORMAT_RGB24_888 code is clarified." (The provenance and quality of that code is still not clarified though, see the still unanswered question in the comment at <https://gerrit.libreoffice.org/c/core/+/116637/2#message-407ec72875fcb015a3024f9a7ebf8480513b1e5e> "external/cairo: Fix previous -fsanitize=alignment fix".) Change-Id: Ic729bff238a35fac69d048b7c3912dd706a5b601 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139211 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-08-31document attempt to upstream cairo patchesCaolán McNamara
Change-Id: If3fc80931a544030a6cef97978f9fed835b4530b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139095 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-31move part of sanitizer patch to the patch that introduced the problemCaolán McNamara
Change-Id: I3fdec4dd5ae93187aebb4a17f9fb01f0a536c9cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139094 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-31ofz#50805 crash seen in fuzzing libreoffice text renderingCaolán McNamara
Change-Id: I8af207ff21399f1bc3f36c01b7d2912692cbb06b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139093 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-27ofz: -Wp,-D_FORTIFY_SOURCE=2 in cairo a problem with msanCaolán McNamara
Change-Id: I5c7bc7b9a370ee3a5c7dd3f7a2c92c5f2b193d58 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138920 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-15external/cairo: Fix -Wincompatible-function-pointer-typesStephan Bergmann
...with recent Clang 16 trunk since <https://github.com/llvm/llvm-project/commit/af01f717c48f0fd2481600ed6c00441763365b62> "Default implicit function pointer conversions diagnostic to be an error", causing > pixman-bits-image.c:1184:39: error: incompatible function pointer types passing 'const float (int, int)' to parameter of type 'dither_factor_t' (aka 'float (*)(int, int)') [-Wincompatible-function-pointer-types] > buffer = dither_apply_ordered (iter, dither_factor_blue_noise_64); > ^~~~~~~~~~~~~~~~~~~~~~~~~~~ > pixman-bits-image.c:1130:60: note: passing argument to parameter 'factor' here > dither_apply_ordered (pixman_iter_t *iter, dither_factor_t factor) > ^ > pixman-bits-image.c:1189:39: error: incompatible function pointer types passing 'const float (int, int)' to parameter of type 'dither_factor_t' (aka 'float (*)(int, int)') [-Wincompatible-function-pointer-types] > buffer = dither_apply_ordered (iter, dither_factor_bayer_8); > ^~~~~~~~~~~~~~~~~~~~~ > pixman-bits-image.c:1130:60: note: passing argument to parameter 'factor' here > dither_apply_ordered (pixman_iter_t *iter, dither_factor_t factor) > ^ Change-Id: I3e28280c9c25dfb7cee5155719a71655db00e344 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138265 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-05Reinstate external/cairo/cairo/san.patch.0Stephan Bergmann
(Instead of just removing any hunks that no longer applied, 86132d8188e5e76623dc8053e5a43c1d69eb0831 "upgrade to cairo 1.17.6" had dropped it completely presumably in error.) Change-Id: I98fe20fc96bd5ce9400b6ad6a9837b21f08cdff0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133892 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-04upgrade to cairo 1.17.6Caolán McNamara
Change-Id: Ibdf84df380c89d3a0713163920a576bf1c47873a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133825 Tested-by: Jenkins Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-01try to use also proper debug LDFLAGS for externals librariesLuboš Luňák
This is basically ea68de2968c0dbcd8e7549435e829db06795c16d but for LDFLAGS. A number of external libs cannot use this because their libtool mishandles -fuse-ld. Change-Id: Idee379eb0a3afb475b536519ee3de064b4e218f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133639 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-04-12use gb_DEBUGINFO_FLAGS consistently in gbuild ExternalProject'sLuboš Luňák
A number of them didn't use it at all, others had it hand-written in various ways. Change-Id: Iaf86325f9cdc032926bac917dc3eef4e34661544 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132818 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-03-30WASM fix native EH build since Emscripten 3.1.6Jan-Marek Glogowski
Building LO with WASM native EH and Emscripten 3.1.6+, the link fails with a missing "emscripten_longjmp" symbol. Actually the old build was simply wrong, because the emscripten_longjmp function is just used for the Emscripten SjLj and not the native WASM SjLj implementation. Linking just worked, because the used libcompiler_rt-wasm-sjlj-mt.a lib was incorrectly providing that symbol, which 3.1.6 removed. But since running the NEH build still fails early in the same way then before in FF nightly 100 and Chrome (= failure in the LO job scheduler calling Task::UpdateMinPeriod for the "desktop::Desktop m_firstRunTimer" timer, resulting in a WASM VM "RuntimeError: indirect call signature mismatch"), there is still no way to know, if nothing else it missing. The Emscripten / JS EH build still works without any code changes. And it's not the first call on a job object that fails... And unfortunatly, because Qt itself also uses libpng, it also uses SjLj for error handling, like LO in the image import, so the Qt build must also be patched to build with "-s SUPPORT_LONGJMP=wasm". Simply enough to do (see README.wasm.md). LO's configure now detects that symbol and will bail out on incompatible Qt and LO build setup. See https://github.com/emscripten-core/emscripten/issues/16572 Change-Id: I3a1877f3aeb77873906176b9d3cd1ea92973f1f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132139 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-03-30ofz#46165 ubsan Divide-by-zeroCaolán McNamara
Change-Id: I5c56eae4456a03550770035610745de3be074679 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132299 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-07ofz: Use-of-uninitialized valueCaolán McNamara
Change-Id: I67063e20f5fc3c3418ee3db5c7a1f3e4a4a7121c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131100 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-01-31externals: always provide platform configure flagsJan-Marek Glogowski
No idea why we just provided the platform flags when cross- compiling. In the curious case, where the host platform is detected as x86_64-pc-mingw32 per default and we actually want to override it with x86_64-pc-cygwin, we don't do a cross compile, but must override the host platform. But there is additional special handling needed for the omitted cross-platform build in the special case of --host=i686-pc-cygwin and --build=x86_64-pc-cygwin, where we deliberatly ignore cross building; Windows is already a slow build, so try to keep this optimization (AMD64 can execute x86 binaries). There is the theoretical case, where the externals config.guess would have detected something else and that "magically" even worked, while the LO detected triplet would fail, but this should be fixed in the external in any way. Change-Id: Ib7a9719e0e406fe90334b7611dc3f01b51692bfa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129153 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-01-19WASM more initial bits and piecesJan-Marek Glogowski
All the small stuff, which is needed for the WASM build, but is not really worth an extra patch. * No soffice.sh script needed for WASM * WASM soffice.bin executable extension is html * Some small additional SAL_LOG output * Default to colibre icon theme * Test for qt5 even without X11 * Remove emconfigure artefacts at the end of the configure run * No oosplash for WASM * Disable the Office IPC thread * Suppress -Wno-enum-conversion for Cairo builds * Fix libnumbertext by using gb_EMSCRIPTEN_CPPFLAGS * Map EMSCRIPTEN to LINUX nls * No extra newlines for missing icon theme images * Print the missing dependency in some gbuild error messages * Copy Qt WASM loader, HTML template and SVG logo for binaries * Especially build the vcldemo for Emscripten Change-Id: I356370c72cc09357411e14d0c00762152877a800 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128584 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-12-04Fix cairo function pointer usageJan-Marek Glogowski
WASM strictly checks function signatures, so forced wrong casting of function pointers compiles, but any call will generate a runtime error, even if the argument is actually ignored. So this adds a bunch of wrapper functions to pass instead. Change-Id: Id976ea3ca81a792c8af539884ef741f5d23fc2c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126317 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-09-02external/cairo: Avoid UBSan invalid-null-argumentStephan Bergmann
...as seen during CppunitTest_sw_uiwriter4: > [_RUN_____] SwUiWriterTest4::testEmojiAutoCorrect cairo-surface.c:2852:28: runtime error: null pointer passed as argument 2, which is declared to never be null > /usr/include/string.h:44:28: note: nonnull attribute specified here > #0 in _cairo_surface_show_text_glyphs at workdir/UnpackedTarball/cairo/src/cairo-surface.c:2852:9 (instdir/program/libcairo.so.2 +0x9ac09e) > #1 in _cairo_gstate_show_text_glyphs at workdir/UnpackedTarball/cairo/src/cairo-gstate.c:2077:15 (instdir/program/libcairo.so.2 +0x65a4af) > #2 in _cairo_default_context_glyphs at workdir/UnpackedTarball/cairo/src/cairo-default-context.c:1315:12 (instdir/program/libcairo.so.2 +0x62404f) > #3 in cairo_show_glyphs at workdir/UnpackedTarball/cairo/src/cairo.c:3629:14 (instdir/program/libcairo.so.2 +0xa6c77f) > #4 in CairoTextRender::DrawTextLayout(GenericSalLayout const&, SalGraphics const&) at vcl/unx/generic/gdi/cairotextrender.cxx:265:9 (instdir/program/libvcllo.so +0xae46aa3) Change-Id: Ifa22046bb35a872c4db38130a7ae4c9b758ccbc6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121473 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-09-01augment CFLAGS for cairo instead of overwritingCaolán McNamara
so CFLAGS containing msan's -fsanitize=memory are not discarded Change-Id: Ib46d060b7542bc3e1b19cdef84ae3f8ea7099b14 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121440 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-31upgrade internal cairo and pixman to 1.17.4 and 0.40.0Caolán McNamara
cairo.RGB24_888.patch is split out from the rest of the unrelated patchfile it was in, this was introduced originally as: commit 54596087e57ea533253e19eea594d9b6c06e8d26 Author: Ashod Nakashian <ashod.nakashian@collabora.co.uk> Date: Sat Dec 9 16:28:42 2017 -0500 vcl-svp: add 24-bit (3-byte) RGB surface support to Cairo drop parts of pixman-ubsan.patch that no longer apply, which maybe casts doubt over the parts that do apply if they are still necessary Change-Id: Id1e8f112b1121b892c97ea248b101f133f03ac48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121234 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-03external/cairo: Fix previous -fsanitize=alignment fixStephan Bergmann
13f6d80330208eeb45fe9a03bb462941fb4eda2a "external/cairo: Support building with ASan/UBSan" had added the src/cairo-image-source.c blob to external/cairo/cairo/san.patch.0 to fix > > cairo-image-source.c:512:10: runtime error: load of misaligned address 0x6180037aee6f for type 'uint32_t' (aka 'unsigned int'), which requires 4 byte alignment > during UITest_writer_tests7 I had created that patch attempting to do a faithful emulation of the original code (which I had naively assumed to be correct, modulo the alignment issue), reading four consecutive bytes and interpreting them as an uint32_t in the system's byte order. I had not noticed back then that all that CAIRO_FORMAT_RGB24_888 was added by external/cairo/cairo/cairo-1.10.2.patch, introduced with 54596087e57ea533253e19eea594d9b6c06e8d26 "vcl-svp: add 24-bit (3-byte) RGB surface support to Cairo". Its > + * @CAIRO_FORMAT_RGB24_888: each pixel is a 24-bit quantity, > + * with Red, Green, Blue taking 8-bits each, in that order. (Since 1.1x) and > + * Need this until CAIRO_FORMAT_RGB24_888 is in some official release. > + * Otherwise we can't reliably check if this is available or we should > + * convert from 24-bit RGB to 32-bit RGB before passing to Cairo. comments make it sound as if this code might come from some official cairo upstream branch, but I cannot find anything at git.freedesktop.org/git/cairo. I have no idea about the provenance and quality of that code. However, I now (a) from the above comments naively assume that the intent of CAIRO_FORMAT_RGB24_888 is to store R, G, B in that order in three bytes with increasing addresses (i.e., independent of the system's byte order for larger- than-byte words); (b) thus consider the original src/cairo-image-source.c code in external/cairo/cairo/cairo-1.10.2.patch broken (as it attempts to read all three values in one read, in system byte order, which would fail for big endian); and (c) thus consider the faithful emulation code in external/cairo/cairo/san.patch.0 to be broken, too. Based on the above, I here fix at least the external/cairo/cairo/san.patch.0 code (which is applied unconditionally, even for non-ASan/UBSan builds, thus always overriding the original external/cairo/cairo/cairo-1.10.2.patch code). The following line > pixel &= 0x00ffffff; /* ignore next pixel bits */ should no longer be necessary now, and it is probably better to directly fix the original code in external/cairo/cairo/cairo-1.10.2.patch, but I'll leave that for a potential follow-up fix, once the provenance and assumed quality of that original CAIRO_FORMAT_RGB24_888 code is clarified. (I came across this code now with a --without-system-cairo ASan/UBSan Linux build, where JunitTest_toolkit_unoapi_1 failed with > ==1060406==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60300146fb48 at pc 0x7fff9b45b338 bp 0x7ffffffef1d0 sp 0x7ffffffef1c8 > READ of size 1 at 0x60300146fb48 thread T0 > Detaching from process 1060652 > #0 in _pixel_to_solid at workdir/UnpackedTarball/cairo/src/cairo-image-source.c:515:207 > #1 in _pixman_image_for_surface at workdir/UnpackedTarball/cairo/src/cairo-image-source.c:1309:22 > #2 in _pixman_image_for_pattern at workdir/UnpackedTarball/cairo/src/cairo-image-source.c:1574:9 > #3 in _cairo_image_source_create_for_pattern at workdir/UnpackedTarball/cairo/src/cairo-image-source.c:1619:2 > #4 in composite_aligned_boxes at workdir/UnpackedTarball/cairo/src/cairo-spans-compositor.c:678:8 > #5 in clip_and_composite_boxes at workdir/UnpackedTarball/cairo/src/cairo-spans-compositor.c:882:11 > #6 in _cairo_spans_compositor_mask at workdir/UnpackedTarball/cairo/src/cairo-spans-compositor.c:999:14 > #7 in _cairo_compositor_mask at workdir/UnpackedTarball/cairo/src/cairo-compositor.c:106:11 > #8 in _cairo_image_surface_mask at workdir/UnpackedTarball/cairo/src/cairo-image-surface.c:952:12 > #9 in _cairo_surface_mask at workdir/UnpackedTarball/cairo/src/cairo-surface.c:2247:14 > #10 in _cairo_gstate_mask at workdir/UnpackedTarball/cairo/src/cairo-gstate.c:1136:11 > #11 in _cairo_default_context_mask at workdir/UnpackedTarball/cairo/src/cairo-default-context.c:993:12 > #12 in cairo_mask at workdir/UnpackedTarball/cairo/src/cairo.c:2283:14 > #13 in SvpSalGraphics::drawAlphaBitmap(SalTwoRect const&, SalBitmap const&, SalBitmap const&) at vcl/headless/svpgdi.cxx:745:5 > #14 in SalGraphics::DrawAlphaBitmap(SalTwoRect const&, SalBitmap const&, SalBitmap const&, OutputDevice const&) at vcl/source/gdi/salgdilayout.cxx:832:16 > #15 in OutputDevice::DrawDeviceAlphaBitmap(Bitmap const&, AlphaMask const&, Point const&, Size const&, Point const&, Size const&) at vcl/source/outdev/bitmap.cxx:704:29 > #16 in OutputDevice::DrawDeviceBitmap(Point const&, Size const&, Point const&, Size const&, BitmapEx&) at vcl/source/outdev/bitmap.cxx:516:9 > #17 in OutputDevice::DrawBitmapEx(Point const&, Size const&, Point const&, Size const&, BitmapEx const&, MetaActionType) at vcl/source/outdev/bitmap.cxx:391:9 > #18 in OutputDevice::DrawBitmapEx(Point const&, Size const&, BitmapEx const&) at vcl/source/outdev/bitmap.cxx:292:9 > #19 in OutputDevice::DrawTransformedBitmapEx(basegfx::B2DHomMatrix const&, BitmapEx const&, double) at vcl/source/outdev/bitmap.cxx:1315:9 > #20 in drawinglayer::processor2d::VclProcessor2D::RenderBitmapPrimitive2D(drawinglayer::primitive2d::BitmapPrimitive2D const&) at drawinglayer/source/processor2d/vclprocessor2d.cxx:394:21 > #21 in drawinglayer::processor2d::VclPixelProcessor2D::processBitmapPrimitive2D(drawinglayer::primitive2d::BitmapPrimitive2D const&) at drawinglayer/source/processor2d/vclpixelprocessor2d.cxx:524:5 > #22 in drawinglayer::processor2d::VclPixelProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/vclpixelprocessor2d.cxx:252:13 > #23 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:69:25 > #24 in drawinglayer::processor2d::VclProcessor2D::RenderTransformPrimitive2D(drawinglayer::primitive2d::TransformPrimitive2D const&) at drawinglayer/source/processor2d/vclprocessor2d.cxx:912:5 > #25 in drawinglayer::processor2d::VclPixelProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/vclpixelprocessor2d.cxx:317:13 > #26 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:69:25 > #27 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:46:13 > #28 in drawinglayer::processor2d::VclPixelProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/vclpixelprocessor2d.cxx:434:13 > #29 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:69:25 > #30 in sdr::contact::ObjectContactOfPageView::DoProcessDisplay(sdr::contact::DisplayInfo&) at svx/source/sdr/contact/objectcontactofpageview.cxx:279:31 > #31 in sdr::contact::ObjectContactOfPageView::ProcessDisplay(sdr::contact::DisplayInfo&) at svx/source/sdr/contact/objectcontactofpageview.cxx:116:21 > #32 in SdrPageWindow::RedrawAll(sdr::contact::ViewObjectContactRedirector*) at svx/source/svdraw/sdrpagewindow.cxx:353:28 > #33 in SdrPageView::CompleteRedraw(SdrPaintWindow&, vcl::Region const&, sdr::contact::ViewObjectContactRedirector*) at svx/source/svdraw/svdpagv.cxx:239:18 > #34 in SdrPaintView::DoCompleteRedraw(SdrPaintWindow&, vcl::Region const&, sdr::contact::ViewObjectContactRedirector*) at svx/source/svdraw/svdpntv.cxx:606:21 > #35 in SdrPaintView::CompleteRedraw(OutputDevice*, vcl::Region const&, sdr::contact::ViewObjectContactRedirector*) at svx/source/svdraw/svdpntv.cxx:519:5 > #36 in sd::View::CompleteRedraw(OutputDevice*, vcl::Region const&, sdr::contact::ViewObjectContactRedirector*) at sd/source/ui/view/sdview.cxx:475:17 > #37 in sd::DrawView::CompleteRedraw(OutputDevice*, vcl::Region const&, sdr::contact::ViewObjectContactRedirector*) at sd/source/ui/view/drawview.cxx:520:21 > #38 in sd::DrawViewShell::Paint(tools::Rectangle const&, sd::Window*) at sd/source/ui/view/drviews5.cxx:420:17 > #39 in sd::Window::Paint(OutputDevice&, tools::Rectangle const&) at sd/source/ui/view/sdwindow.cxx:212:22 > #40 in PaintHelper::DoPaint(vcl::Region const*) at vcl/source/window/paint.cxx:313:20 > #41 in vcl::Window::ImplCallPaint(vcl::Region const*, ImplPaintFlags) at vcl/source/window/paint.cxx:616:17 > #42 in PaintHelper::~PaintHelper() at vcl/source/window/paint.cxx:552:30 > #43 in vcl::Window::ImplCallPaint(vcl::Region const*, ImplPaintFlags) at vcl/source/window/paint.cxx:622:1 > #44 in PaintHelper::~PaintHelper() at vcl/source/window/paint.cxx:552:30 > #45 in vcl::Window::ImplCallPaint(vcl::Region const*, ImplPaintFlags) at vcl/source/window/paint.cxx:622:1 > #46 in PaintHelper::~PaintHelper() at vcl/source/window/paint.cxx:552:30 > #47 in vcl::Window::ImplCallPaint(vcl::Region const*, ImplPaintFlags) at vcl/source/window/paint.cxx:622:1 > #48 in PaintHelper::~PaintHelper() at vcl/source/window/paint.cxx:552:30 > #49 in vcl::Window::ImplCallPaint(vcl::Region const*, ImplPaintFlags) at vcl/source/window/paint.cxx:622:1 > #50 in vcl::Window::PaintImmediately() at vcl/source/window/paint.cxx:1325:24 > #51 in vcl::Window::PaintImmediately() at vcl/source/window/paint.cxx:1269:39 > #52 in SvImpLBox::MyUserEvent(void*) at vcl/source/treelist/svimpbox.cxx:3063:18 > #53 in SvImpLBox::LinkStubMyUserEvent(void*, void*) at vcl/source/treelist/svimpbox.cxx:3057:1 > #54 in Link<void*, void>::Call(void*) const at include/tools/link.hxx:111:45 > #55 in ImplHandleUserEvent(ImplSVEvent*) at vcl/source/window/winproc.cxx:1991:30 > #56 in ImplWindowFrameProc(vcl::Window*, SalEvent, void const*) at vcl/source/window/winproc.cxx:2561:13 > #57 in SalFrame::CallCallback(SalEvent, void const*) const at vcl/inc/salframe.hxx:306:29 > #58 in SvpSalInstance::ProcessEvent(SalUserEventList::SalUserEvent) at vcl/headless/svpinst.cxx:312:22 > #59 in non-virtual thunk to SvpSalInstance::ProcessEvent(SalUserEventList::SalUserEvent) at vcl/headless/svpinst.cxx (instdir/program/libvcllo.so +0xae7a222) > #60 in SalUserEventList::DispatchUserEvents(bool)::$_0::operator()() const at vcl/source/app/salusereventlist.cxx:119:58 > #61 in SalUserEventList::DispatchUserEvents(bool) at vcl/source/app/salusereventlist.cxx:120:13 > #62 in SvpSalInstance::DoYield(bool, bool) at vcl/headless/svpinst.cxx:461:19 > #63 in ImplYield(bool, bool) at vcl/source/app/svapp.cxx:465:48 > #64 in Application::Yield() at vcl/source/app/svapp.cxx:532:5 > #65 in Application::Execute() at vcl/source/app/svapp.cxx:444:9 > #66 in desktop::Desktop::Main() at desktop/source/app/app.cxx:1587:13 > #67 in ImplSVMain() at vcl/source/app/svmain.cxx:198:35 > #68 in SVMain() at vcl/source/app/svmain.cxx:230:12 > #69 in soffice_main at desktop/source/app/sofficemain.cxx:98:12 > #70 in sal_main at desktop/source/app/main.c:49:15 > #71 in main at desktop/source/app/main.c:47:1 > #72 in __libc_start_main at /usr/src/debug/glibc-2.33-8.fc34.x86_64/csu/../csu/libc-start.c:332:16 > #73 in _start at <null> (instdir/program/soffice.bin +0x251acd) > > 0x60300146fb48 is located 0 bytes to the right of 24-byte region [0x60300146fb30,0x60300146fb48) > allocated by thread T0 here: > #0 in operator new[](unsigned long) at ~/github.com/llvm/llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp:102:3 > #1 in ImplCreateDIB(Size const&, vcl::PixelFormat, BitmapPalette const&) at vcl/headless/svpbmp.cxx:126:24 > #2 in SvpSalBitmap::Create(Size const&, vcl::PixelFormat, BitmapPalette const&) at vcl/headless/svpbmp.cxx:156:13 > #3 in Bitmap::Bitmap(Size const&, vcl::PixelFormat, BitmapPalette const*) at vcl/source/bitmap/bitmap.cxx:135:15 > #4 in Bitmap::Crop(tools::Rectangle const&) at vcl/source/bitmap/bitmap.cxx:489:20 > #5 in BitmapEx::Crop(tools::Rectangle const&) at vcl/source/bitmap/BitmapEx.cxx:360:25 > #6 in drawinglayer::primitive2d::DiscreteShadow::getLeft() const at drawinglayer/source/primitive2d/discreteshadowprimitive2d.cxx:148:61 > #7 in drawinglayer::primitive2d::DiscreteShadowPrimitive2D::create2DDecomposition(drawinglayer::primitive2d::Primitive2DContainer&, drawinglayer::geometry::ViewInformation2D const&) const at drawinglayer/source/primitive2d/discreteshadowprimitive2d.cxx:251:72 > #8 in drawinglayer::primitive2d::BufferedDecompositionPrimitive2D::get2DDecomposition(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&, drawinglayer::geometry::ViewInformation2D const&) const at drawinglayer/source/primitive2d/baseprimitive2d.cxx:122:9 > #9 in drawinglayer::primitive2d::DiscreteMetricDependentPrimitive2D::get2DDecomposition(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&, drawinglayer::geometry::ViewInformation2D const&) const at drawinglayer/source/primitive2d/primitivetools2d.cxx:48:47 trying to read the fourth byte of a presumed uint32_t starting at offset 21 of a 24-byte buffer.) Change-Id: Ibe8bc39e3736c64ace61af2217100c9d8bb96d5c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116637 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-06-01cairo: just register and use external fontconfigJan-Marek Glogowski
Except for the pixman include, the ANDROID cairo external is the same then the other OS use. It also builds fontconfig, so there is really no need to depend on the source (ok, this way it can be a bit more parallel, if nothing is generated). But the build nevertheless always sets includes for fontconfig anyway. And the code implied you can build Android without --disable-dynloading. Change-Id: I9970dc5c052b6fa80588233244c6828079d8277e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116554 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-06-01cairo: Drop config for WNT and MACOSX buildJan-Marek Glogowski
It's not used on these platforms since a long time. Change-Id: Idac41f1be0a546fd8aa0dd88709ebfa3255a104e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116555 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-05-05WASM: add initial support for Emscripten cross buildJan-Marek Glogowski
- configure with: - --host=wasm64-local-emscripten - had to make a few externals optional, so adding: - --disable-nss - --disable-cmis - --disable-curl Change-Id: I48d1c73d2675ad2e2beaf2c341578199efbd24ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111130 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2020-12-29external/cairo: Fix mask usage in image-compositorStephan Bergmann
Change-Id: Id3d8e4715e295290e07146ef06898b313ead57a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108449 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-10-30external/cairo: Silence some more UBSan warningsStephan Bergmann
...seen when opening an Impress presentation on GNOME/X11: > cairo-xlib-source.c:570:26: runtime error: left shift of 191 by 24 places cannot be represented in type 'int' > cairo-xlib-render-compositor.c:1852:17: runtime error: left shift of negative value -186 > cairo-xlib-render-compositor.c:1853:17: runtime error: left shift of negative value -646 > cairo-xlib-surface-shm.c:1157:43: runtime error: member access within null pointer of type 'cairo_xlib_shm_surface_t' (aka 'struct _cairo_xlib_shm_surface') > cairo-fixed-private.h:252:8: runtime error: left shift of negative value -146048 Change-Id: I93a5706c2ec3f83bc56d75fc92817668eef57fdb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105074 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-10-28external/cairo: Fix another UBSan invalid-shift-baseStephan Bergmann
> pixman-utils.c:217:14: runtime error: left shift of 155 by 24 places cannot be represented in type 'int' ...which happened once while using the LO GUI Change-Id: I174a29e240f09576859308ada56fe240881f0dad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104915 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-10-20external/cairo: Support building with ASan/UBSanStephan Bergmann
A full `make check screenshot` required lots of little "harmless" fixes in pixman and cairo to address: > cairo-image-compositor.c:133:34: runtime error: left shift of 255 by 24 places cannot be represented in type 'int' during CppunitTest_emfio_emf > pixman-fast-path.c:3089:23: runtime error: left shift of 255 by 24 places cannot be represented in type 'int' during CppunitTest_emfio_emf > pixman-sse2.c:5019:17: runtime error: load of misaligned address 0x7f99303dbac5 for type 'uint32_t' (aka 'unsigned int'), which requires 4 byte alignment during CppunitTest_emfio_emf > cairo-fixed-private.h:64:14: runtime error: left shift of negative value -8388608 during CppunitTest_emfio_wmf > pixman-sse2.c:6443:20: runtime error: left shift of 198 by 24 places cannot be represented in type 'int' during CppunitTest_filter_svg > pixman-sse2.c:5976:6: runtime error: load of misaligned address 0x629000163202 for type 'uint32_t' (aka 'unsigned int'), which requires 4 byte alignment during CppunitTest_filter_svg > pixman-sse2.c:3259:10: runtime error: load of misaligned address 0x606000c85761 for type 'uint32_t' (aka 'unsigned int'), which requires 4 byte alignment during CppunitTest_oox_vml > pixman-sse2.c:521:18: runtime error: load of misaligned address 0x607000ca9d41 for type 'const uint32_t' (aka 'const unsigned int'), which requires 4 byte alignment during CppunitTest_oox_vml > pixman-gradient-walker.c:196:14: runtime error: left shift of 255 by 24 places cannot be represented in type 'int' during CppunitTest_sc_tiledrendering > pixman-combine32.c:786:1: runtime error: left shift of 255 by 24 places cannot be represented in type 'int32_t' (aka 'int') during CppunitTest_vcl_backend_test > pixman-fast-path.c:2761:29: runtime error: left shift of negative value -99 during CppunitTest_xmloff_draw > pixman-bits-image.c:243:31: runtime error: left shift of negative value -99 during CppunitTest_xmloff_draw > pixman-bits-image.c:244:31: runtime error: left shift of negative value -9 during CppunitTest_sd_tiledrendering > pixman-fast-path.c:2762:29: runtime error: left shift of negative value -84 during CppunitTest_sw_rtfexport2 > cairo-gstate.c:2300:14: runtime error: null pointer passed as argument 1, which is declared to never be null during CppunitTest_sw_ooxmlexport8 > pixman-access.c:389:2: runtime error: left shift of 1 by 31 places cannot be represented in type 'int' during CppunitTest_sw_ooxmlexport15 > ERROR: AddressSanitizer: stack-use-after-scope on address 0x7ff264ae275c at pc 0x7ff238941795 bp 0x7fff6bbadb10 sp 0x7fff6bbadb08 > READ of size 4 at 0x7ff264ae275c thread T0 > #0 in _add_clipped_edge at workdir/UnpackedTarball/cairo/src/cairo-polygon.c:351:24 (instdir/program/libcairo.so.2 +0x88c794) during CppunitTest_sw_odfexport > cairo-tor-scan-converter.c:1619:34: runtime error: left shift of negative value -39 during CppunitTest_sw_odfexport > ERROR: AddressSanitizer: stack-use-after-scope on address 0x7fe6ca085750 at pc 0x000000325c3a bp 0x7fff899bedd0 sp 0x7fff899be580 > READ of size 16 at 0x7fe6ca085750 thread T0 > #0 in __asan_memcpy at /home/sbergman/github.com/llvm/llvm-project/compiler-rt/lib/asan/asan_interceptors_memintrinsics.cpp:22:3 (workdir/LinkTarget/Executable/cppunittester +0x325c39) during CppunitTest_sw_odfexport > pixman-sse2.c:3352:14: runtime error: left shift of 65535 by 16 places cannot be represented in type 'int' during CppunitTest_sw_odfexport > cairo-gstate.c:2355:14: runtime error: null pointer passed as argument 1, which is declared to never be null during CppunitTest_basctl_dialogs_test > pixman-sse2.c:3537:10: runtime error: load of misaligned address 0x615000167682 for type 'uint32_t' (aka 'unsigned int'), which requires 4 byte alignment during CppunitTest_sc_screenshots > cairo-image-source.c:512:10: runtime error: load of misaligned address 0x6180037aee6f for type 'uint32_t' (aka 'unsigned int'), which requires 4 byte alignment during UITest_writer_tests7 Change-Id: Icd2a211df4751d8dbfd5903bfba424b4c4672999 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104572 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-09-25Related: tdf#136980 cairo: avoid linking to freetype-2.8-only ...Miklos Vajna
... FT_Get_Var_Design_Coordinates This is meant to help producing binaries which run on Ubuntu 16.04. Change-Id: I7fc965c265d2ac97a6836df0829d3d4cd0cc9333 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103392 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-09-25tdf#136980 cairo: avoid linking to freetype-2.8 symbolsMiklos Vajna
This is meant to help producing binaries on CentOS 7 which run on Ubuntu 16.04, when using internal cairo. Change-Id: Ie4cd3fe707225a951ec8a5fb49a755064701dcfa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103378 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-02-16GBUILD_TRACE, support for finding out where the build time is spentLuboš Luňák
See instructions in solenv/gbuild/Trace.mk . This generates a file than can be viewed e.g. in the Chromium tracing view. Change-Id: I5f90647c58ca729375525b6daed2d4918adc8188 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88754 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-11-27android: Introduce --enable-android-lok configure switch to fix RGB vs. BGR.Jan Holesovsky
This indicates that the build targets the Online-based Android app, for which we need to avoid various tweaks that are needed for the 'old' Android app present in the android/ subdir of core.git. In particular, the switch used in this patch fixes a RGBA vs. BGRA confusion that caused yellow <-> cyan switch in the Online-based Android app. Change-Id: I5f394868f51ce87013677834cfafb967b9bb333e Reviewed-on: https://gerrit.libreoffice.org/83342 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit 49002a143a4534df5f6139e07fefd06174621c59) Reviewed-on: https://gerrit.libreoffice.org/83718 Tested-by: Jenkins
2019-09-05tdf#121983 cairo: fix RPATH to contain $ORIGIN, not libtool's nonsenseMichael Stahl
Also transmit $(verbose) to the build so it's debuggable. Change-Id: I8620fdcae2fcd34807b6b83b7c38aa5ca1ba2caa Reviewed-on: https://gerrit.libreoffice.org/78596 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2019-03-25cairo configure fails with gold linker with sanitizers enabledCaolán McNamara
Change-Id: I1afbe64fdd8847b0a826be58ee81f218308a0ef5 Reviewed-on: https://gerrit.libreoffice.org/69661 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>