You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
336 B
17 lines
336 B
// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
|
|
|
|
// Test the frexp() interceptor.
|
|
|
|
#include <math.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
int main() {
|
|
double x = 3.14;
|
|
int *exp = (int*)malloc(sizeof(int));
|
|
free(exp);
|
|
double y = frexp(x, exp);
|
|
// CHECK: use-after-free
|
|
// CHECK: SUMMARY
|
|
return 0;
|
|
}
|