public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug sanitizer/115461] New: lsan doesn't work on s390x
@ 2024-06-12 14:36 mpolacek at gcc dot gnu.org
  2024-06-12 14:38 ` [Bug sanitizer/115461] " mpolacek at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2024-06-12 14:36 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115461

            Bug ID: 115461
           Summary: lsan doesn't work on s390x
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: sanitizer
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mpolacek at gcc dot gnu.org
                CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
                    jakub at gcc dot gnu.org, kcc at gcc dot gnu.org
  Target Milestone: ---

It appears that -fsanitize=leak has no effect on s390x; it doesn't detect even
the simplest leaks:

```
#include <stdlib.h>
#include <stdio.h>

int main() {
    void* ptr = malloc(123);
    printf("%x\n", ptr);
    return 0;
}
```

On x86_64, I get:

=================================================================
==69068==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 123 byte(s) in 1 object(s) allocated from:
    #0 0x7fd39ce13de5 in malloc (/lib64/liblsan.so.0+0x13de5) (BuildId:
bd0edcefa09c842881bff411016cb80201b5bdd9)
    #1 0x401147 in main (/home/mpolacek/x/trunk/gcc/a.out+0x401147) (BuildId:
f29bbf6d55a2764be0623cb24526521a08243448)
    #2 0x7fd39cc46149 in __libc_start_call_main (/lib64/libc.so.6+0x28149)
(BuildId: 0d710e9d9dc10c500b8119c85da75004183618e2)
    #3 0x7fd39cc4620a in __libc_start_main_impl (/lib64/libc.so.6+0x2820a)
(BuildId: 0d710e9d9dc10c500b8119c85da75004183618e2)
    #4 0x401074 in _start (/home/mpolacek/x/trunk/gcc/a.out+0x401074) (BuildId:
f29bbf6d55a2764be0623cb24526521a08243448)

SUMMARY: LeakSanitizer: 123 byte(s) leaked in 1 allocation(s).


Incidentally, we have *no* -fsanitize=leak tests whatsoever.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-06-13 15:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-12 14:36 [Bug sanitizer/115461] New: lsan doesn't work on s390x mpolacek at gcc dot gnu.org
2024-06-12 14:38 ` [Bug sanitizer/115461] " mpolacek at gcc dot gnu.org
2024-06-12 15:50 ` pinskia at gcc dot gnu.org
2024-06-12 17:47 ` mpolacek at gcc dot gnu.org
2024-06-13  8:57 ` iii at linux dot ibm.com
2024-06-13 14:57 ` iii at linux dot ibm.com
2024-06-13 15:02 ` iii at linux dot ibm.com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).