[llvm-dev] DataFlowSanitizer label overwriting
Magnus Morton via llvm-dev
llvm-dev at lists.llvm.org
Mon May 24 01:40:17 PDT 2021
Hi,
When using DataFlowSanitizer, I've noticed that assigning to a
labelled location overwrites or removes that label.
e.g. in this sample, the assert fails:
int a = 5;
dfsan_label a_label = dfsan_create_label("a", 0);
dfsan_set_label(a_label, &a, sizeof(a));
a = 6;
dfsan_label check = dfsan_read_label(&a, sizeof(a));
assert(dfsan_has_label(check, a_label));
Remove the a = 6 statement and the assert passes.
This makes sense if the intended use of DataFlowSanitizer is taint
analysis alone, but isn't helpful if I want to track how a particular
memory location is used throughout a program and don't care what is
stored in it or when.
Is there a dfsan flag that retains the original label after a store?
I've tried the obvious ones with no luck.
Many thanks,
Magnus
More information about the llvm-dev
mailing list