Bug 2093385 - test_leaksan.c test case from upstream integration test suite fails on aarch64, no leaks found
Summary: test_leaksan.c test case from upstream integration test suite fails on aarch6...
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: clang
Version: 8.7
Hardware: aarch64
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Tom Stellard
QA Contact: Jesus Checa
URL:
Whiteboard:
Depends On: 2055187
Blocks: 2140677
TreeView+ depends on / blocked
 
Reported: 2022-06-03 14:59 UTC by Jesus Checa
Modified: 2022-11-07 15:53 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 2055187
: 2140677 (view as bug list)
Environment:
Last Closed:
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-124223 0 None None None 2022-06-03 15:08:09 UTC

Description Jesus Checa 2022-06-03 14:59:35 UTC
+++ This bug was initially created as a clone of Bug #2055187 +++

Description of problem:

$ cat test_leaksan.c
// Test asan use after free
//
// REQUIRES: clang
// RUN: %clang -o %t -fsanitize=address -g %s
// RUN: env ASAN_OPTIONS="log_path=stdout:exitcode=0"  %t 2>&1 > %t.out
// RUN: grep -q "detected memory leaks" %t.out

#include <stdlib.h>

void *p;

int main() {
  p = malloc(7);
  p = 0; // The memory is leaked here.
  return 0;
}
$ 
$ /usr/bin/clang -o test_leaksan.c.tmp -fsanitize=address -g test_leaksan.c
$ env ASAN_OPTIONS="log_path=stdout:exitcode=0" ./test_leaksan.c.tmp 2>&1 > test_leaksan.c.tmp.out
$ grep -q "detected memory leaks" test_leaksan.c.tmp.out
$ cat test_leaksan.c.tmp.out 
$ 


Version-Release number of selected component (if applicable):

clang-13.0.1-1.module+el8.6.0+14118+d530a951.aarch64
llvm-13.0.1-1.module+el8.6.0+14118+d530a951.aarch64
glibc-2.28-189.el8.aarch64


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:


Note You need to log in before you can comment on or make changes to this bug.