summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-11-18 07:40:01 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-11-18 11:43:33 +0100
commit831148376eed244292638d57099ab92fe4bdffbe (patch)
tree7051127675e06b44c28b004a76f30bc8e7841b3f
parent6318f3a9805c9a8831a06e8bd471dea095fcf8ba (diff)
external/skia: UBSan needs GrContext_Base RTTI now
...in vcl: > [GAL] sounds > instdir/program/gengal.bin: symbol lookup error: instdir/program/libvcllo.so: undefined symbol: _ZTI14GrContext_Base > make[1]: *** [solenv/gbuild/Gallery.mk:56: workdir/Gallery/sounds.done] Error 1 (I didn't check what source exactly causes UBSan to require it now.) Marking both the class and some of its members as SK_API would cause MSVC to fail with > error: attribute 'dllexport' cannot be applied to member of 'dllexport' class so remove it from the class members. Change-Id: I9f5ed397d32f1f445bfa1d70bcff494e78c16046 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106039 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r--external/skia/UnpackedTarball_skia.mk3
-rw-r--r--external/skia/ubsan.patch.032
2 files changed, 34 insertions, 1 deletions
diff --git a/external/skia/UnpackedTarball_skia.mk b/external/skia/UnpackedTarball_skia.mk
index b4aab05a80c5..319b33716a96 100644
--- a/external/skia/UnpackedTarball_skia.mk
+++ b/external/skia/UnpackedTarball_skia.mk
@@ -35,7 +35,8 @@ skia_patches := \
fix-windows-dwrite.patch.1 \
c++20.patch.0 \
constexpr-debug-std-max.patch.1 \
- swap-buffers-rect.patch.1
+ swap-buffers-rect.patch.1 \
+ ubsan.patch.0
$(eval $(call gb_UnpackedTarball_set_patchlevel,skia,1))
diff --git a/external/skia/ubsan.patch.0 b/external/skia/ubsan.patch.0
new file mode 100644
index 000000000000..c249b02f3f14
--- /dev/null
+++ b/external/skia/ubsan.patch.0
@@ -0,0 +1,32 @@
+--- include/private/GrContext_Base.h
++++ include/private/GrContext_Base.h
+@@ -20,7 +20,7 @@
+ class GrImageContext;
+ class GrRecordingContext;
+
+-class GrContext_Base : public SkRefCnt {
++class SK_API GrContext_Base : public SkRefCnt {
+ public:
+ ~GrContext_Base() override;
+
+@@ -32,7 +32,7 @@
+ /*
+ * The 3D API backing this context
+ */
+- SK_API GrBackendApi backend() const;
++ GrBackendApi backend() const;
+
+ /*
+ * Retrieve the default GrBackendFormat for a given SkColorType and renderability.
+@@ -41,9 +41,9 @@
+ *
+ * The caller should check that the returned format is valid.
+ */
+- SK_API GrBackendFormat defaultBackendFormat(SkColorType, GrRenderable) const;
++ GrBackendFormat defaultBackendFormat(SkColorType, GrRenderable) const;
+
+- SK_API GrBackendFormat compressedBackendFormat(SkImage::CompressionType) const;
++ GrBackendFormat compressedBackendFormat(SkImage::CompressionType) const;
+
+ // TODO: When the public version is gone, rename to refThreadSafeProxy and add raw ptr ver.
+ sk_sp<GrContextThreadSafeProxy> threadSafeProxy();