Skip to main content
Filter by
Sorted by
Tagged with
3 votes
1 answer
133 views

I have included the reflect-cpp header into a source file. It compiles. However if I add: -fsanitize=undefined It no longer compiles and complains that: /app/raw.githubusercontent.com/boost-ext/...
Zebrafish's user avatar
  • 16.5k
1 vote
0 answers
94 views

This is a follow-up related to Inconsistent false positives with Clang CFI sanitizer and function pointers, but it is for a separate issue Issue Background I have an array of structs which store ...
Anon's user avatar
  • 381
1 vote
0 answers
121 views

Issue Background I have an array of structs which store function pointers, which I loop over and call (my real code is more complex than the sample given). To ensure correct behaviour, I enabled CFI ...
Anon's user avatar
  • 381
3 votes
1 answer
123 views

I have the following code: #include <stdlib.h> #include <stdio.h> int main() { void* a = malloc(10); printf("%p\n", a); } When compiled and run: clang-19 -std=c23 -...
user18490's user avatar
  • 3,904
1 vote
0 answers
220 views

I am attempting to write a function which takes as input a Nix derivation (any derivation which can build with clang), and as output, returns a modified version of the derivation that builds with ...
ggg's user avatar
  • 111
0 votes
1 answer
75 views

In my ideal solution, I want a Makefile that set sanitizers based on SAN variable, only when I call the target "debug", and take care that, as now, gcc do not support -fsanitize=memory, so ...
Valerio's user avatar
  • 374
1 vote
0 answers
65 views

I integrate hwaddress sanitizer according to the document: enter link description here then run the app, log output shows run wrap.sh failed #!/system/bin/sh echo "wrap Running with HWASAN $@&...
leizh007's user avatar
4 votes
1 answer
128 views

When I read the documentation of fflush, it says that it returns 0, it it was successful and it returns EOF (EOF is on my machine -1) otherwise. (see https://man7.org/linux/man-pages/man3/fflush.3....
byteunit's user avatar
  • 1,063
0 votes
1 answer
339 views

Derived from llvm error when attempt to build libcxx instrumented with memory sanitizer I am attempting to build LLVM with the libcxx and libcxxabi projects instrumented with MemorySanitizer (Msan) ...
JacobNowitsky's user avatar
0 votes
1 answer
128 views

Here is the minimal reproducible example: // my_func.h typedef volatile struct { int a; } my_vdata_t; typedef struct { int a; } my_data_t; extern void (*vfunc)(my_vdata_t* data); extern void (*...
Simpdanny's user avatar
2 votes
1 answer
224 views

I have a collection of JPEG files that I would like to scale down by a specific size with zimg (aka z.lib) library: This is my code snippet: #include <cstdio> // fopen, fseek, ftell, fread, ...
aculnaig's user avatar
1 vote
1 answer
288 views

I'm running ThreadSanitizer with -02 and g compiler flags and without gdb. It detects the race condition and prints the stacktraces but it continues running. I was fortunate to be monitoring. Is there ...
intrigued_66's user avatar
  • 17.6k
0 votes
1 answer
211 views

There is the following piece of code #include <iostream> #include <type_traits> thread_local std::aligned_storage_t<1024> data; int main() { std::cout << sizeof(data) <&...
getsoubl's user avatar
  • 1,117
1 vote
1 answer
447 views

Using Angular in html I need to add title attribute on <a> tag, the value of the title will have text and special characters. The attribute should render tooltip on the anchor, but it is not ...
Kate's user avatar
  • 349
2 votes
1 answer
454 views

What is the difference Between Linters, Sanitizers and Analyzers? And what are some examples of Linters, Sanitizers and Analyzers for Python? Also are they dependent on the IDE that you are using? I ...
Allie's user avatar
  • 354
2 votes
1 answer
4k views

I'm on Windows using Visual Studio compiler. I'm using /fsanitize=address to compile with AddressSanitizer. I run my exe from command line. I want my exe to continue on ASAN errors and write all ASAN ...
MattTT's user avatar
  • 607
19 votes
1 answer
6k views

I always compile my programs with gcc and during development always with: gcc -g -Wall -Wextra -std=c2x -fsanitize=address,undefined Today I noticed that the address sanitizer randomly detects SEGVs ...
ben's user avatar
  • 191
32 votes
1 answer
15k views

The Problem Recently on Linux Kernels 6.6.6 and higher it was discovered that thread sanitizer will always lead to this error: FATAL: ThreadSanitizer: unexpected memory mapping 0x5c9bd4d2b000-...
Philipp Doerner's user avatar
7 votes
0 answers
366 views

I'm developing a static freestanding nolibc/nostdlib program for Linux and would like to use the C compiler's memory, address and undefined behavior sanitizers to improve my code. I couldn't get it to ...
Matheus Moreira's user avatar
1 vote
0 answers
1k views

I have built pdfium with thread sanitizer enabled. To do this I have followed these instructions: git clone 'https://chromium.googlesource.com/chromium/tools/depot_tools.git' export PATH="${PWD}/...
mathripper's user avatar
1 vote
0 answers
301 views

I'm trying to interact with interfaces of AddressSanitizer while using Rust, but I'm having some difficulties. Specifically, I want to write a hook that is called immediately when ASan detects an ...
Jeonghyeon Kim's user avatar
0 votes
1 answer
1k views

I need help on how to add sanitization to the url and alt text of this code. What is the best way to do this as this is something I'm not very familiar with. I tried researching but not able to find a ...
developer8492's user avatar
0 votes
0 answers
81 views

Recently I was writing my raytracer project and made some bugs in it. I have a function: double Length(const Vector& v) { return std::sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]); } and then ...
Greg's user avatar
  • 19
3 votes
0 answers
220 views

I'm hitting a stack overflow where a (Rust default) stack size of 2 MiB is insufficient and a very basic piece of code crashes. If I set RUST_MIN_STACK=4159616, then it works as expected. ...
Vitali's user avatar
  • 3,785
3 votes
0 answers
135 views

I have a scenario where a python script loads a shared object on a Ubuntu 20 x64 system. The shared object is instrumented with thread sanitizer. However, once the libary loads it spawns a "...
Desperado17's user avatar
  • 1,073
0 votes
0 answers
35 views

Is it possible to create a folder outside of working folder without direct use of double period with ruby's Dir.mkdir s or mkdir_p s. I am interested in linux-like systems only. My goal it to sanitise ...
Serge's user avatar
  • 3,845
4 votes
1 answer
3k views

auto vec = std::vector<int>({1, 2, 3}); std::cout << *vec.end() << std::endl; Here is some simple code that I believe to be UB. However, compiling this with the following steps: g++ ...
doliphin's user avatar
  • 1,044
0 votes
1 answer
1k views

do I need to sanitise TIPTAP text editor with nextJs? If so, what sanitiser is best with nextJS and TIPTAP text editor?
Tony's user avatar
  • 5
0 votes
1 answer
93 views

I know that erasing elements from an associative container inside a for loop invalidates it. Is it the case when using a range based loop? #include <iostream> #include <unordered_map> #...
Peter's user avatar
  • 185
0 votes
0 answers
58 views

I have some code that does almost nothing, but it does so in a convoluted way. Most importantly, it does not allocate anything. All data is on the stack. It works just fine with many versions of gcc ...
Patrick Fromberg's user avatar
1 vote
0 answers
134 views

I'm facing some problems with this summernote font-family, it's being rejected by the sanitizer, and the error are pointing to this css URL: @font-face{font-family:"summernote";font-style:...
Mauro H. Delmondes's user avatar
0 votes
1 answer
366 views

I've been working with C++ and have been utilizing the UBA sanitizer to convert a double to an unsigned long long. However, I've been encountering an issue when the value is negative, which results in ...
Raz Cohen's user avatar
1 vote
0 answers
70 views

I use Sanitizer to compile C code, my compile cmd is: gcc -fsanitize=address -fsanitize=leak -o test test.c. When I run ./test in shell, I got the LeakSanitizer Error info. But When I use subprocess ...
icy17's user avatar
  • 19
0 votes
1 answer
468 views

This works all fine on Codepen, even without window. I am surprised about that because I am used to be forced to use ẁindow.x if ( 'Sanitizer' in window ) { console.log( 'sani', 'Sanitizer' in ...
redanimalwar's user avatar
  • 1,543
0 votes
1 answer
91 views

I need help fixing an fsanitize=address error on this code. If I compile my .c program with the flags "fsanitize=address -g" I get the following error: ==93042==ERROR: AddressSanitizer: heap-...
Tomas Pinausig's user avatar
0 votes
1 answer
434 views

I have installed a package of HTML sanitizer in my local(v7.0.0). it works fine in my local. So I built the code and deployed to server. But in the server the sanitizer page gets encountered with ...
Rakesh C's user avatar
3 votes
0 answers
427 views

I have some multi platform project and address sanitizer found couple issues when running gtest unit tests (issues are from dependencies which where not build with sanitizer). Here is how end of gtest ...
Marek R's user avatar
  • 40.5k
5 votes
2 answers
456 views

I am using owasp-java-html-sanitizer and try to add id-attributes to each h2-tag in my HTML Code, which should be persistent over several page loads but unique for each element on the page(as defined ...
Nixen85's user avatar
  • 1,411
4 votes
1 answer
1k views

I know there are many similar questions on SO. Please read carefully before calling this a dup. If it is, I would be happy to get a reference to the relevant question. It seems to me that the clang ...
Ben Ylvisaker's user avatar
25 votes
3 answers
5k views

I'm using clang++ 10 on Ubuntu 20.04 LTS, with -fsanitize-undefined-trap-on-error -fsanitize=address,undefined,nullability,implicit-integer-truncation,implicit-integer-arithmetic-value-change,implicit-...
Henrique Bucher's user avatar
1 vote
1 answer
1k views

When I use nm | grep '__ubsan', it returns: U __ubsan_handle_add_overflow U __ubsan_handle_divrem_overflow U __ubsan_handle_dynamic_type_cache_miss U __ubsan_handle_load_invalid_value U ...
JoeManiaci's user avatar
3 votes
2 answers
1k views

Here is my code: #include <iostream> #include <cstdio> int main() { char *str = new char[64] ; std::sprintf(str, "msg: %s", "hello world") ; std::cout <...
Debashis De's user avatar
0 votes
0 answers
979 views

I have been working with the latest release of gcc (GCC 12.1, released May 6, 2022). There is a new command-line option : -fsanitize=shadow-call-stack. The documentation states: GCC now supports the ...
DevShark's user avatar
  • 9,188
7 votes
0 answers
126 views

In our codebase we expect that strings only exist once in the compiled binary. I observe that -fsanitize=address can generate duplicated strings in the executable. This breaks our code. The ...
Thomas m's user avatar
  • 153
9 votes
1 answer
5k views

I want to use this kind of sanitizer in gcc. How can I do this? Is such an operation possible? I found solution for clang: clang -fsanitize=memory -fno-omit-frame-pointer -g -O2 umr.cc but I don't ...
xyz12345's user avatar
2 votes
2 answers
2k views

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 ...
user2577547's user avatar
0 votes
1 answer
2k views

Is possible to suppress unit test functions? I have address sanitizer in my project and I am getting reports with info about stack-buffer-overflow, which I want to supress. It's already one ...
daasz's user avatar
  • 9
1 vote
0 answers
559 views

I can't use fsanitize on Macos every time I execute my programs this message appears: a.out(1003,0x111253600) malloc: nano zone abandoned due to inability to preallocate reserved vm space. the code ...
Arcadia's user avatar
  • 11
3 votes
1 answer
904 views

I was trying to find a memory leak from a simple program: #include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdint.h> void parse(const char* input) { // ...
Jacket's user avatar
  • 165
2 votes
1 answer
3k views

Recently I have been studying the Clang sanitizer. I find the flag -fsanitize-coverage can be trace-pc or trace-pc-guard. According to the official document(Tracing PCs with guards, Tracing PCs), both ...
SeekaMoon's user avatar