Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging problems with lldb and -fsanitize=address

What needs to be accounted for when using -fsanitize=address -fno-omit-frame-pointerwith clang? I experienced some weird debugging behaviour (std::string not beeing formatted correctly) when using the address sanitizer with -fsanitize=address.

Can we not rely on the debugger when the address sanitizer is on?

like image 905
Gabriel Avatar asked Aug 10 '26 18:08

Gabriel


1 Answers

The address sanitizer does many extra transformations on the generated code, and those transformations often need to update the debug information. One symptom if they don't is that the debugger will be pointed at the wrong location for a variable. We've seen and fixed a handful of bugs of this sort, but it looks like you have come across another one. Please file it either with the bugs.llvm.org bug reporter. – Jim Ingham Jan 14 at 23:52

like image 68
Jim Ingham Avatar answered Aug 13 '26 11:08

Jim Ingham



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!