1 // RUN: %clang_dfsan %s -o %t
4 // REQUIRES: x86_64-target-arch
6 #include <sanitizer/dfsan_interface.h>
12 int foo(int a
, int b
) {
16 int main(int argc
, char *argv
[]) {
19 dfsan_set_label(8, &a
, sizeof(a
));
20 dfsan_set_label(128, &b
, sizeof(b
));
22 printf("A: 0x%x\n", dfsan_get_label(a
));
23 printf("B: 0x%x\n", dfsan_get_label(b
));
24 dfsan_label l
= dfsan_get_label(c
);
25 printf("C: 0x%x\n", l
);
26 assert(l
== 136); // OR of the other two labels.