Michael Smith has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/24851


Change subject: KUDU-3804: Fix symbol hiding for protobuf well-known types
......................................................................

KUDU-3804: Fix symbol hiding for protobuf well-known types

The exported client library's linker version script (symbols.map) hides
glog, gflags, and protobuf symbols behind a "*google::*" C++ demangled
wildcard so they don't collide with a host application's own copies of
these libraries.

protobuf's generated descriptor tables for its well-known types
(any.proto, descriptor.proto, source_context.proto, type.proto,
wrappers.proto) are emitted as plain, non-namespaced globals (e.g.
descriptor_table_google_2fprotobuf_2fdescriptor_2eproto and
TableStruct_google_2fprotobuf_2fdescriptor_2eproto::offsets), so they
are not matched by "*google::*" and leak out of the DSO with default
visibility.

This was harmless while the client's bundled protobuf matched the host
application's protobuf version, but after bumping protobuf to 3.21.9 for
GCC-15 support (KUDU-3803), the leaked symbols collide with an older,
ABI-incompatible protobuf runtime statically linked into the host
application, corrupting process-wide descriptor state and crashing the
host process on startup.

Add explicit patterns to symbols.map to localize these well-known-type
descriptor table symbols, both in their plain (unmangled) form and their
C++-mangled form.

Change-Id: I64f88bbfab6a709ae31fb18ed97cfc58cb8b647d
Assisted-By: Claude Sonnet 5 (GitHub Copilot)
---
M src/kudu/client/symbols.map
1 file changed, 15 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/51/24851/1
--
To view, visit http://gerrit.cloudera.org:8080/24851
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I64f88bbfab6a709ae31fb18ed97cfc58cb8b647d
Gerrit-Change-Number: 24851
Gerrit-PatchSet: 1
Gerrit-Owner: Michael Smith <[email protected]>

Reply via email to