Skip to content

Commit

Permalink
asan sucks
Browse files Browse the repository at this point in the history
  • Loading branch information
trcrsired committed Oct 1, 2024
1 parent 385fdf1 commit 85ab1e6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/0026.container/0004.string/tefa.cc
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/*
This is an example to explain why address sanitizers suck
*/
#include <fast_io.h>
#include <fast_io_dsal/string_view.h>
#include <fast_io_dsal/string.h>
Expand All @@ -9,5 +12,6 @@ int main()
using namespace ::fast_io::io;
println("before replace:", str, "\n", vw);
str.replace_index(1, 5, vw);
// dangling string_view
println("after replace:", str, "\n", vw); // asan cannot detect this, but my secrect tool can lol
}

0 comments on commit 85ab1e6

Please sign in to comment.