[llvm-dev] Support for larger DFSan labels

Sam Kerner via llvm-dev llvm-dev at lists.llvm.org
Mon Dec 21 14:05:28 PST 2020


On Mon, Dec 21, 2020 at 1:38 PM Carson Harmon via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
>
> Hi, I had a question about ongoing DFSan development and wanted to potentially upstream some features.
>
> Currently, in DFSan the label size is uint16, is anyone against bumping it to be a uint32?

That would cause a substantial increase in memory overhead.  The size
of the shadow memory region would need to double.

> I found this modification to be needed to run DFSan on programs like document parsers.

Can you give some details on why you need so many labels?  How many
are you allocating?

Programs can run out of labels due to linking issues that mix
instrumented and uninstrumented code.  Arguments intended for
uninstrumented code are interpreted as labels.  The unions of these
incorrect labels consume more labels as they are unioned.  To see if
you are hitting such an issue:

1) Disable all calls to dfsan_set_label(), so that no labels are set
by your code.  A search-and-replace that comments out all the lines is
one way to do this.

2) Build and run your binary, with the environment variable
"DFSAN_OPTIONS" set to "warn_nonzero_labels=1".  No labels are set, so
any warning about a set label you see indicates an issue.


>
> Thanks for your time,
> Carson
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev


More information about the llvm-dev mailing list