Questions tagged [sanitizer]

Sanitizers are a compiler feature supported by Clang and GCC for instrumenting programs to do dynamic analysis and catch many classes of bugs at runtime.

Sanitizers are a compiler feature supported by Clang and GCC for instrumenting programs to do dynamic analysis. There are sanitizers to detect many issues, including many C and C++ "undefined behaviors", signed integer arithmetic overflow, memory allocation errors, use of uninitialized memory, and data races between threads.

These checks can be enabled at compile time using the -fsanitize= option (for example, -fsanitize=address).

The following sanitizers are supported:

More information on the sanitizers development can be found at http://compiler-rt.llvm.org/.

The current list of supported options can be found in the compiler documentation:

120 questions
0
votes
1 answer

Building C library (FFmpeg) with Android NDK r17: undefined reference to '__mulodi4'

My problem happens to be with FFmpeg but I suspect that this would happen with almost any C library. Problem Description My app uses FFmpeg that is compiled with NDK r10e. I am trying to update everything to NDK r17, while also switching to clang,…
fpsulli3
  • 363
  • 1
  • 11
0
votes
0 answers

AddressSanitizer clang direct leak address

How can I find out the address of direct leak in clang address sanitizer. For example, if it returns Direct leak of 32 byte(s) in 1 object(s) allocated from: …
0
votes
1 answer

Using Memory Sanitizer instrumented libc++

I have built an instrumented libc++ as described here. I have set the flags as the above site suggests: MSAN_CFLAGS="-fsanitize=memory -stdlib=libc++ -L/path_to/llvm-build-msan/lib -lc++abi -I/path_to/llvm-build-msan/include…
robert
  • 3,539
  • 3
  • 35
  • 56
0
votes
1 answer

How to catch errors raised by AddressSanitizer in C++ libraries accessed via python extension

I have a python module that uses an external C++ library using a C++ extension build with distutils. When I compile the C++ library with the address sanitizer, -fsanitize option of GCC, I get a segfault when running unit tests. Now, initially I…
Perennialista
  • 1,083
  • 2
  • 12
  • 22
0
votes
1 answer

In GDB, using Clang & MemorySanitizer, how can I retrieve the address that triggers an error?

I am using Clang & MemorySanitizer and got some false positives due to inline assembly. The inline assembly code initializes some memory that is used afterwards, but the MemorySanitizer regards this as a use-of-uninitialized-value. I am trying to…
0
votes
0 answers

Is this "may be used uninitialized" warning bogus?

When I compile this silly fortran routine: SUBROUTINE MY (C,M,NA,A,NB,B,N,V,I1,I2) IMPLICIT NONE INTEGER :: M, NA, NB, N, I, J, I1, I2 REAL :: C, A(NA,M), B(NB,M), V(N), X IF(M.GT.15) THEN DO I=1,N X=C*V(I) CALL…
Jellby
  • 2,360
  • 3
  • 27
  • 56
0
votes
1 answer

what package do I need to use clang with asan for 32 bit?

I get this error when compiling with clang++ and -fsanitize=address -m32: /usr/bin/ld: cannot find /usr/lib/llvm-3.6/bin/../lib/clang/3.6.0/lib/linux/libclang_rt.asan-i386.a: No such file or directory /usr/bin/ld: cannot find…
onqtam
  • 4,356
  • 2
  • 28
  • 50
0
votes
1 answer

mplayer build with address sanitizer (asan)

I am trying to build mplayer using clang with the address sanitizer flag. However, I keeps getting errors when I execute make. Here is the full output log including the commands I used. Any help will be much appreciated. kt@kt-VirtualBox:~/mplayer$…
K.L.
  • 1
  • 2
0
votes
1 answer

g++ 4.9 sanitizer bug with cin parsing boolean on linux (ubuntu 12.04 64-bit)

This looks like a g++ bug (possibly sanitizer related) to me but was I wondering if anyone with clang (given the gcc sanitizer is from clang afaik), or a different g++ version, will have different results? This is a simple program which reads in 3…
aho
  • 304
  • 2
  • 11
0
votes
1 answer

clang memory sanitizer (linux) does not report errors

I'm attempting to produce clang memory sanitizer errors on a linux platform with a toy program. I haven't been able to produce any errors with what I believe is a correct platform / compilation / execution. A simple description of the…
manabear
  • 431
  • 3
  • 6
0
votes
1 answer

Html Agility Pack: a simple "Sanitizer" with dictionary parameters

Seach engine wasn't enough for information about shape of dictionary parameters of AjaxControlToolkit.Sanitizer.HtmlAgilityPackSanitizerProvider sanitizer = new AjaxControlToolkit.Sanitizer.HtmlAgilityPackSanitizerProvider(); …
0
votes
1 answer

why the AntiXss and ValidateRequest ="true" is not working combinely?

I am trying to avoid an cross side scripting in my Application but my requirement is i have to save the data including the script to my database but when displaying the same data it it should be visible as a text not as a script for eg: Step 1 : i…
Mak
  • 1
  • 3
0
votes
1 answer

Activerecord regex search with mass_assignment_sanitizer = :strict

I want to perform following search request .where("url REGEXP ?", '^/gallery/\d+') but sanitizer spoils expression and i get this: ^/gallery/\\\\d+ how force skip sanitizing for this condition?
LeX
  • 91
  • 5
0
votes
1 answer

Phone number sanitizer for intent.ACTION_CALL

I have the following onClickListener(): phonereserveListener = new OnClickListener() { @Override public void onClick(View v) { if (phone!=null){ String url = "tel:"+phone; Intent callIntent = new…
rosu alin
  • 5,674
  • 11
  • 69
  • 150
-1
votes
2 answers

How to resolve this segmentation fault in my program with the following Address Sanitizer output?

This question is a sequel of my previous question and the current status is that I have obtained the output of address sanitizer -- suggested by @Employed Russian -- which is given below. This is my first time that I have used address sanitizer so I…
user110219
  • 153
  • 10
1 2 3 4 5 6 7
8