office-gobmx/external/fontconfig/UnpackedTarball_fontconfig.mk
Stephan Bergmann 2dca86cde3 external/fontconfig: Avoid UBSan invalid-null-argument
...as seen when CppunitTest_services is run while instdir/share/fonts/ happens
to still be unpopulated (which is otherwise not an issue for that test),

> fcdir.c:268:11: runtime error: null pointer passed as argument 1, which is declared to never be null
> /usr/include/stdlib.h:852:30: note: nonnull attribute specified here
>  #0 in FcDirScanConfig at workdir/UnpackedTarball/fontconfig/src/fcdir.c:268:5
>  #1 in FcDirCacheScan at workdir/UnpackedTarball/fontconfig/src/fcdir.c:354:10
>  #2 in FcDirCacheRead at workdir/UnpackedTarball/fontconfig/src/fcdir.c:462:10
>  #3 in FcConfigAddDirList at workdir/UnpackedTarball/fontconfig/src/fccfg.c:537:10
>  #4 in FcConfigAppFontAddDir at workdir/UnpackedTarball/fontconfig/src/fccfg.c:2912:10
>  #5 in psp::PrintFontManager::addFontconfigDir(rtl::OString const&) at vcl/unx/generic/fontmanager/fontconfig.cxx:748:20
>  #6 in psp::PrintFontManager::initialize() at vcl/unx/generic/fontmanager/fontmanager.cxx:711:17
>  #7 in GenericUnixSalData::InitPrintFontManager() at vcl/unx/generic/app/gendata.cxx:51:26
>  #8 in GenericUnixSalData::GetPrintFontManager() at vcl/inc/unx/gendata.hxx:88:13
>  #9 in psp::PrintFontManager::get() at vcl/unx/generic/fontmanager/fontmanager.cxx:108:23
>  #10 in GenPspGraphics::GetDevFontListHelper(vcl::font::PhysicalFontCollection*) at vcl/unx/generic/print/genpspgraphics.cxx:264:35
>  #11 in FreeTypeTextRenderImpl::GetDevFontList(vcl::font::PhysicalFontCollection*) at vcl/unx/generic/gdi/freetypetextrender.cxx:110:5
>  #12 in SvpSalGraphics::GetDevFontList(vcl::font::PhysicalFontCollection*) at vcl/headless/svptext.cxx:51:23
>  #13 in OutputDevice::ImplInitFontList() const at vcl/source/outdev/font.cxx:651:17
>  #14 in OutputDevice::GetDefaultFont(DefaultFontType, o3tl::strong_int<unsigned short, LanguageTypeTag>, GetDefaultFontFlags, OutputDevice const*) at vcl/source/outdev/font.cxx:532:22
>  #15 in SwStdFontConfig::GetDefaultFor(unsigned short, o3tl::strong_int<unsigned short, LanguageTypeTag>) at sw/source/uibase/config/fontcfg.cxx:245:23
>  #16 in SwStdFontConfig::SwStdFontConfig() at sw/source/uibase/config/fontcfg.cxx:91:30
>  #17 in SwModule::SwModule(SfxObjectFactory*, SfxObjectFactory*, SfxObjectFactory*) at sw/source/uibase/app/swmodule.cxx:150:32
>  #18 in std::__detail::_MakeUniq<SwModule>::__single_object std::make_unique<SwModule, SfxObjectFactory*&, SfxObjectFactory*&, SfxObjectFactory*&>(SfxObjectFactory*&, SfxObjectFactory*&, SfxObjectFactory*&) at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/13.0.0/../../../../include/c++/13.0.0/bits/unique_ptr.h:1076:34
>  #19 in SwDLL::SwDLL() at sw/source/uibase/app/swdll.cxx:98:26
>  #20 in (anonymous namespace)::SwDLLInstance::SwDLLInstance() at sw/source/uibase/app/swdll.cxx:57:212
>  #21 in rtl::Static<(anonymous namespace)::SwDLLInstance, (anonymous namespace)::theSwDLLInstance>::get() at include/rtl/instance.hxx:399:18
>  #22 in SwGlobals::ensure() at sw/source/uibase/app/swdll.cxx:70:9
>  #23 in SwXAutoTextContainer_get_implementation at sw/source/uibase/uno/unoatxt.cxx:1015:5

Change-Id: Ic0d246e6012b3cd2c9a9deb63c2af7258f31f0d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140214
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-09-20 08:45:16 +02:00

21 lines
713 B
Makefile

# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_UnpackedTarball_UnpackedTarball,fontconfig))
$(eval $(call gb_UnpackedTarball_set_tarball,fontconfig,$(FONTCONFIG_TARBALL),,fontconfig))
$(eval $(call gb_UnpackedTarball_set_patchlevel,fontconfig,0))
$(eval $(call gb_UnpackedTarball_add_patches,fontconfig,\
external/fontconfig/fontconfig-2.12.1.patch.1 \
external/fontconfig/ubsan.patch \
))
# vim: set noet sw=4 ts=4: