[DragonFlyBSD - Bug #3429] (New) libva-intel-media-driver: avoid unload crash by localizing C++ implementation symbols

sigttou bugtracker-admin at leaf.dragonflybsd.org
Thu Oct 1 10:49:58 PDT 2026


Issue #3429 has been reported by sigttou.

----------------------------------------
Bug #3429: libva-intel-media-driver: avoid unload crash by localizing C++ implementation symbols
http://bugs.dragonflybsd.org/issues/3429

* Author: sigttou
* Status: New
* Priority: Normal
* Category: Driver
* Target version: 6.6
* Start date: 2026-10-01
----------------------------------------
Unloading Mesa LLVM before iHD can crash iHD's static destructors on DragonFly.
Exported C++ template functions and type information can bind to LLVM, while
rtld fails to retain LLVM for those bindings.

load libLLVM-mesa-13.so (RTLD_GLOBAL), load iHD (RTLD_LOCAL), close LLVM, then close iHD.

    shared map helper: /usr/local/lib/libLLVM-mesa-13.so
Closing LLVM before iHD
helper still mapped: 0
Closing iHD
Process result: SIGSEGV (11)

    #0  0x00000008010722d0 in ?? ()
#1  ~_Rb_tree (this=0x807ccaae0 <(anonymous namespace)::APISticker::APIMap>) at media_driver/linux/common/codec/ddi/media_ddi_encode_hevc.cpp:1663
#2  ~map (... <(anonymous namespace)::APISticker::APIMap>) at /usr/include/c++/8.0/bits/stl_map.h:300
#3  __static_initialization_and_destruction_0 (...) at media_driver/linux/common/codec/ddi/media_ddi_encode_hevc.cpp:42
#4  objlist_call_fini () from ld-elf.so.2
#5  dlclose () from ld-elf.so.2
#6  main () at driver-unload-check.c

The unresolved top frame is iHD's static std::map destruction calling into LLVM
code after LLVM has been unmapped. Keeping LLVM loaded avoids the crash.

Keep iHD's standard-library implementation symbols local with a linker version
script, avoiding these cross-library bindings. Adding DT_NEEDED for LLVM would
also retain the provider, but introduces an unnecessary dependency.



---Files--------------------------------
0001-ihd-private-cxx.patch (1.63 KB)


-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account


More information about the Bugs mailing list