Issue |
120278
|
Summary |
Sanitizer common_interface_defs not actually common to all sanitizers
|
Labels |
new issue
|
Assignees |
|
Reporter |
tavianator
|
`<sanitizer/msan_interface.h>` includes `<sanitizer/common_interface_defs.h>`, so I assumed that those functions would be available under MSan as well as ASan. But it seems not to be the case:
```console
$ cat foo.c
#include <sanitizer/msan_interface.h>
#include <stdlib.h>
int main(void) {
char *buf = malloc(1024);
__sanitizer_annotate_contiguous_container(buf, buf + 1024, buf + 512, buf + 1024);
return 0;
}
$ clang -fsanitize=memory foo.c
/usr/bin/ld: /tmp/foo-072909.o: in function `main':
foo.c:(.text+0x171): undefined reference to `__sanitizer_annotate_contiguous_container'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
$ clang --version
clang version 18.1.8
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs