| Issue |
170658
|
| Summary |
Callstack contains no function names after upgrading from clang19 to clang20
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
paolonevis
|
I have the following c program:
```
#include <stdlib.h>
int main (int argv, char **argc) {
malloc(20);
return 0;
}
```
if I compile it with clang16 I get this:
```
paolo@localhost:$ clang --version
clang version 16.0.6 (Red Hat 16.0.6-1.el9)
Target: x86_64-redhat-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
paolo@localhost:$ ASAN_OPTIONS=detect_leaks=1 clang -g -Wno-error=return-type-c-linkage -fsanitize=address -fno-omit-frame-pointer -fsanitize-recover=address test.cpp -o test16
paolo@localhost:$ ./test16
=================================================================
==1192377==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 20 byte(s) in 1 object(s) allocated from:
#0 0x4b80c2 in __interceptor_malloc (/test16+0x4b80c2) (BuildId: 03cc265ed41808a3267918ee42ee3fa71ae4aef0)
#1 0x4f39bf in main test.cpp:4:2
#2 0x7fd21176ceaf in __libc_start_call_main (/lib64/libc.so.6+0x3feaf) (BuildId: f3e223f668f8fccd242dc204be6d233c553a3c9b)
SUMMARY: AddressSanitizer: 20 byte(s) leaked in 1 allocation(s).
paolo@localhost:$
```
with clang20 I get this:
```
bash-5.1# clang --version
clang version 20.1.8 (RESF 20.1.8-3.el9)
Target: x86_64-redhat-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Configuration file: /etc/clang/x86_64-redhat-linux-gnu-clang.cfg
bash-5.1# ASAN_OPTIONS=detect_leaks=1 clang -g -Wno-error=return-type-c-linkage -fsanitize=address -fno-omit-frame-pointer -fsanitize-recover=address test.cpp -o test20
bash-5.1# ./test20
=================================================================
==20406==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 20 byte(s) in 1 object(s) allocated from:
#0 0x0000004cf4f8 (/__w/bc/bc/bc/test20+0x4cf4f8) (BuildId: 18050817cfd11b133459e06abb6fc0940765a27a)
#1 0x00000051425f (/__w/bc/bc/bc/test20+0x51425f) (BuildId: 18050817cfd11b133459e06abb6fc0940765a27a)
#2 0x7fad318f960f (/lib64/libc.so.6+0x2a60f) (BuildId: e650335ac8463e9e58c04e07c6f36c5f826ed953)
SUMMARY: AddressSanitizer: 20 byte(s) leaked in 1 allocation(s).
bash-5.1#
```
As you can see, the function, filename and linenumber of the leak are not visible any longer.
I checked the docu and I couldn't find any other flag that I would have to set.
For both tests I run Rocky 9 linux.
Many thanks for your help.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs