[PATCH] D36810: Minimal runtime for UBSan.

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 25 18:24:32 PDT 2017


vsk added inline comments.


================
Comment at: compiler-rt/lib/ubsan_minimal/ubsan_minimal_handlers.cc:53
+    if (!report_this_error(__builtin_return_address(0))) return; \
+    message("ubsan: " msg "\n");                                 \
+  }                                                              \
----------------
eugenis wrote:
> vsk wrote:
> > Printing out the return address here would aid debugging. It's extra complexity but would be worth it when triaging bugs, or when using the minimal runtime in low-level software.
> Even if it's just an absolute address, w/o module base? It's does not give you much in the presence of ASLR.
> 
This would still be helpful while debugging xnu, or firmware which runs without ASLR. While debugging the kernel you can print out the slide offset for the text segment.


https://reviews.llvm.org/D36810





More information about the llvm-commits mailing list