================
@@ -0,0 +1,24 @@
+# Tests that the UBSan Instrumentation Runtime's utility expression
+# runs as C (and doesn't try to find decls in the ObjC runtime).
+# Tests that the UBSan Instrumentation Runtime's utility expression
+# runs as C (and doesn't try to find decls in the ObjC runtime).
+#
+# RUN: split-file %s %t
+# RUN: %clangxx_host -g %t/main.cpp -fsanitize=undefined -o %t.out
+#
+# RUN: %lldb -s %t/commands.input %t.out -o exit \
+# RUN:     | FileCheck %s --implicit-check-not="AppleObjCDeclVendor"
+
+#--- main.cpp
+
+int main() {
+  int *p = nullptr;
----------------
DanBlackwell wrote:

This is going to get a segfault which is probably not what you want (ASan 
installs signal handlers - and this will catch that rather than be an ASan 
runtime generated error). This would be better:
```
int arr[10];
arr[11] = 42;
return 0;
```

https://github.com/llvm/llvm-project/pull/172019
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to