[PATCH] D141389: [DFSAN] Add support for strnlen, strncat, strsep, sscanf and _tolower

Tomasz Kuchta via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 1 14:08:31 PST 2023


tkuchta added inline comments.


================
Comment at: compiler-rt/lib/dfsan/dfsan_custom.cpp:221
+  if (flags().strict_data_dependencies) {
+    *ret_label = res ? s_label : 0;
+  } else {
----------------
browneee wrote:
> When `res != NULL`, then `res` is derived from `*s`, not from `s`.
> 
> e.g.
> 
> ```
> *ret_label = res ? dfsan_get_label(base) : 0;
> ```
Apologies for a delay.

I came across some difficulty with using dfsan_get_label inside the dfsan_custom.cpp file.
It seems that including the dfsan_interface.h header there, which would be needed for dfsan_get_label, causes other conflicts and build errors.
Would there be another way to use that function inside dfsan_custom.cpp? 


Repository:
  rCRT Compiler Runtime

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141389/new/

https://reviews.llvm.org/D141389



More information about the cfe-commits mailing list