1 // RUN: %clang_esan_frag -O0 %s -o %t 2>&1 2 // RUN: %env_esan_opts=verbosity=3 %run %t 2>&1 | FileCheck %s 3 4 #include <string.h> 5 6 int main(int argc, char **argv) { 7 char Buf[2048]; 8 const char Str[] = "TestStringOfParticularLength"; // 29 chars. 9 strcpy(Buf, Str); 10 strncpy(Buf, Str, 17); 11 return strncmp(Buf, Str, 17); 12 // CHECK: in esan::initializeLibrary 13 // CHECK: in esan::processRangeAccess {{.*}} 29 14 // CHECK: in esan::processRangeAccess {{.*}} 29 15 // CHECK: in esan::processRangeAccess {{.*}} 17 16 // CHECK: in esan::processRangeAccess {{.*}} 17 17 // CHECK: in esan::processRangeAccess {{.*}} 17 18 // CHECK: in esan::processRangeAccess {{.*}} 17 19 // CHECK: in esan::finalizeLibrary 20 } 21