1 // RUN: %clang_dfsan -gmlt -mllvm -dfsan-track-origins=1 %s -o %t && \
2 // RUN: %run %t >%t.out 2>&1
3 // RUN: FileCheck %s < %t.out
5 #include <sanitizer/dfsan_interface.h>
7 int main(int argc
, char *argv
[]) {
10 dfsan_set_label(8, (void *)&z1
, sizeof(z1
));
11 dfsan_set_label(16, (void *)&z2
, sizeof(z2
)); // overwritting the old origin.
13 dfsan_print_origin_trace(&c
, "bar");
17 // CHECK: Taint value 0x8 {{.*}} origin tracking (bar)
18 // CHECK: Origin value: {{.*}}, Taint value was stored to memory at
19 // CHECK: #0 {{.*}} in main {{.*}}origin_overlapped.c:[[@LINE-7]]
21 // CHECK: Origin value: {{.*}}, Taint value was created at
23 // CHECK: #0 {{.*}} in main {{.*}}origin_overlapped.c:[[@LINE-12]]