Category : address-sanitizer

Probably a bit funny question – trying to run ASAN in older (unsupported) Visual Studio Express. Suppose it would not be easy to adjust "standalone" VS 2022 Build Tools install to be able to use its MSBuild for older VS solutions even from cmd (without whole VS2022 installed). But a bit of hack worked in ..

Read more

I’m trying to use Google sanitizers https://www.jetbrains.com/help/clion/google-sanitizers.html on my CMake project using CLion. I need to pass ASAN_OPTIONS=detect_container_overflow=0 environment variable so that Google sanitizers can pass on the container overflow error. I put "ASAN_OPTIONS=detect_container_overflow=0" in the Run/Debug configuration, but it didn’t work, the sanitizer still halt at container_overflow errors and won’t proceed. So I added ..

Read more

I am trying to suppress ASAN issues in an external library, therefore I am following llvm-asan-suppressing-reports-in-external-libraries, the docs says: If you run into an issue in external libraries, we recommend immediately reporting it to the library maintainer so that it gets addressed ASAN trace ==6968==ERROR: AddressSanitizer: attempting free on address which was not malloc()-ed: 0x01e7aceb3be0 ..

Read more

I’ve followed this documentation to run a minimal MSVC compiled application with asan enabled: https://docs.microsoft.com/en-us/cpp/sanitizers/asan?view=msvc-170#command-prompt When running the executable on Windows 10, using the latest msvc v16.11.7 (we also tested 2 earlier versions on a different pc), the runtime output only contains the first 2 lines. So I can see: AddressSanitizer: global-buffer-overflow on address 0x006fbed0 ..

Read more

Why the following code #include <iostream> #include <vector> typedef struct Number { int number = 15; } Number; int main() { std::vector<Number*> nums(5); for (size_t i = 0; i < nums.size(); ++i) { Number num; nums[i] = &num; } std::cout << nums[1]->number << "n"; return 0; } trigger "AddressSanitizer: stack-use-after-scope", but when i comment line ..

Read more