[Lldb-commits] [PATCH] D108228: Fix error handling in the libcxx std::string formatter
Jonas Devlieghere via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Aug 17 22:24:37 PDT 2021
JDevlieghere added inline comments.
================
Comment at: lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/string/main.cpp:102
+ std::string *not_a_string = (std::string *) 0x0;
+ touch_string(*not_a_string);
return 0;
----------------
shafik wrote:
> This is undefined behavior and I AFAICT this won't pass a sanitized build, amazingly even if I use `__attribute__((no_sanitize("address", "undefined")))` : https://godbolt.org/z/4TGPbrYhq
Definitely UB, but the sanitized bot builds LLDB with the sanitizers, not the test cases, so this should be "fine".
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108228/new/
https://reviews.llvm.org/D108228
More information about the lldb-commits
mailing list