summarylogtreecommitdiffstats
path: root/f4f62699e5d5b821e83dc2f902d486cf5c2b2755.patch
blob: cd8784e64460edc6a90896e01c15e2cf10b037d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From f4f62699e5d5b821e83dc2f902d486cf5c2b2755 Mon Sep 17 00:00:00 2001
From: Antoine Pitrou <antoine@python.org>
Date: Tue, 9 Oct 2018 09:00:02 -0400
Subject: [PATCH] ARROW-3466: [C++] Avoid leaking protobuf symbols

Our linker script hides "google::*" symbols exported from various C++ modules, but that isn't enough to actually hide all symbols.  Some symbols (vtables, destructors, "guard variables"...) aren't hidden.

The ORC library links protobuf statically, and we link ORC statically. So we ended up exporting protobuf symbols.  When linking another protobuf instance dynamically (like tensorflow does), this can wreak havoc.  Hiding all symbols fixes the issue.

Author: Antoine Pitrou <antoine@python.org>

Closes #2731 from pitrou/ARROW-3466-protobuf-symbol-leak and squashes the following commits:

0aa4648aa <Antoine Pitrou> ARROW-3466:  Avoid leaking protobuf symbols
---
 cpp/src/arrow/symbols.map | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/cpp/src/arrow/symbols.map b/cpp/src/arrow/symbols.map
index 69717f089d..96faf596d5 100644
--- a/cpp/src/arrow/symbols.map
+++ b/cpp/src/arrow/symbols.map
@@ -62,6 +62,9 @@
     je_arrow_*;
     # ORC destructors
     _ZThn8_N3orc*;
+    # Protobuf symbols that aren't hidden by the C++ section below
+    # (destructors, vtables, other stuff)
+    *N6google8protobuf*;
 
     extern "C++" {
       # devtoolset or -static-libstdc++ - the Red Hat devtoolset statically