[clang] [Clang-REPL] Fix crash during `__run_exit_handlers` with dynamic libraries. (PR #117475)

Vassil Vassilev via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 27 01:07:32 PST 2024


================
@@ -0,0 +1,20 @@
+// REQUIRES: host-supports-jit, x86_64-linux
+
+// RUN: rm -rf %t
+// RUN: mkdir -p %t
+//
+// RUN: split-file %s %t
+//
+// RUN: %clang++ -std=c++20 -fPIC -c %t/vec.cpp -o %t/vec.o
+// RUN: %clang++ -shared %t/vec.o -o %t/vec.so
+//
+// RUN: cat %t/Test.cpp | LD_LIBRARY_PATH=%t:$LD_LIBRARY_PATH clang-repl
+
+//--- vec.cpp
+#include <vector>
+
+//--- Test.cpp
+%lib vec.dylib
----------------
vgvassilev wrote:

```suggestion
%lib vec.so
```

https://github.com/llvm/llvm-project/pull/117475


More information about the cfe-commits mailing list