21 lines · cpp
1// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s2 3// Test the frexpl() interceptor.4 5// FIXME: MinGW-w64 implements `frexpl()` as a static import, so the dynamic6// interceptor seems to not work.7// XFAIL: target={{.*-windows-gnu}}8 9#include <math.h>10#include <stdio.h>11#include <stdlib.h>12int main() {13 long double x = 3.14;14 int *exp = (int *)malloc(sizeof(int));15 free(exp);16 double y = frexpl(x, exp);17 // CHECK: use-after-free18 // CHECK: SUMMARY19 return 0;20}21