examples/video_studio/main.cpp includes the vendored httplib.h and links
vllm::shared. vllm_shared links vllm PRIVATE
(CMakeLists.txt:2654), so the example inherits neither
CPPHTTPLIB_OPENSSL_SUPPORT nor OpenSSL::SSL. It therefore compiles the
vendored header in the no-TLS layout while libvllm.so contains the same
header compiled in the TLS layout. CPPHTTPLIB_OPENSSL_SUPPORT is a
whole-header switch that changes the layout of httplib::Result and
httplib::ClientConnection, which is why a50c57d69 put the define on the
target rather than per file.
On ELF this is safe BY CONSTRUCTION, not by luck
cmake/vllm_export.map is
VLLM_ABI_1 { global: vllm_*; local: *; };
so every httplib symbol inside libvllm.so is local and cannot be
preempted by, or preempt, the example's own copy. The two layouts never meet.
The gap is the Apple leg
That version script is applied under if(UNIX AND NOT APPLE)
(CMakeLists.txt:2661), and the tree already records why: a linker version
script is a GNU-ld/ELF feature with no ld64 spelling, so "the macOS dylib
therefore exports its default symbol set" (CMakeLists.txt:2656-2660). ld64
uses -exported_symbols_list, which this build does not pass.
On macOS the C++ internals of libvllm.dylib are therefore exported, including
its httplib inline and template instantiations. Whether Mach-O weak-definition
coalescing can then bind the example's no-TLS httplib::Result code against the
dylib's TLS-layout definition, or the reverse, is unmeasured. If it can, the
symptom is a silently corrupted response object with a clean link and no
diagnostic anywhere — the same failure mode a50c57d69 avoided on the library
side.
What would close it
Either measure it on macOS and record that coalescing cannot cross this
boundary, or give vllm_shared an -exported_symbols_list on the ld64 leg so
the Apple build has the same guarantee the ELF build has by construction.
tests/CMakeLists.txt's capi_shared_exports_only_abi check is gated on the
same UNIX AND NOT APPLE condition, so it does not cover this either.
Severity
Low, and not a blocker. No macOS build here has been measured, video-studio is
an example rather than a shipped path, and the ELF leg — every CI lane and every
released Linux artifact — is provably unaffected. Found while fixing
#1531; recorded rather than
fixed because closing it needs a macOS host this row does not have.
examples/video_studio/main.cppincludes the vendoredhttplib.hand linksvllm::shared.vllm_sharedlinksvllmPRIVATE(
CMakeLists.txt:2654), so the example inherits neitherCPPHTTPLIB_OPENSSL_SUPPORTnorOpenSSL::SSL. It therefore compiles thevendored header in the no-TLS layout while
libvllm.socontains the sameheader compiled in the TLS layout.
CPPHTTPLIB_OPENSSL_SUPPORTis awhole-header switch that changes the layout of
httplib::Resultandhttplib::ClientConnection, which is whya50c57d69put the define on thetarget rather than per file.
On ELF this is safe BY CONSTRUCTION, not by luck
cmake/vllm_export.mapisso every httplib symbol inside
libvllm.sois local and cannot bepreempted by, or preempt, the example's own copy. The two layouts never meet.
The gap is the Apple leg
That version script is applied under
if(UNIX AND NOT APPLE)(
CMakeLists.txt:2661), and the tree already records why: a linker versionscript is a GNU-ld/ELF feature with no ld64 spelling, so "the macOS dylib
therefore exports its default symbol set" (
CMakeLists.txt:2656-2660). ld64uses
-exported_symbols_list, which this build does not pass.On macOS the C++ internals of
libvllm.dylibare therefore exported, includingits httplib inline and template instantiations. Whether Mach-O weak-definition
coalescing can then bind the example's no-TLS
httplib::Resultcode against thedylib's TLS-layout definition, or the reverse, is unmeasured. If it can, the
symptom is a silently corrupted response object with a clean link and no
diagnostic anywhere — the same failure mode
a50c57d69avoided on the libraryside.
What would close it
Either measure it on macOS and record that coalescing cannot cross this
boundary, or give
vllm_sharedan-exported_symbols_liston the ld64 leg sothe Apple build has the same guarantee the ELF build has by construction.
tests/CMakeLists.txt'scapi_shared_exports_only_abicheck is gated on thesame
UNIX AND NOT APPLEcondition, so it does not cover this either.Severity
Low, and not a blocker. No macOS build here has been measured,
video-studioisan example rather than a shipped path, and the ELF leg — every CI lane and every
released Linux artifact — is provably unaffected. Found while fixing
#1531; recorded rather than
fixed because closing it needs a macOS host this row does not have.