Details
Diff Detail
Event Timeline
lib/hwasan/hwasan_interceptors_memintrinsics.cc | ||
---|---|---|
44 ↗ | (On Diff #177686) | Internal versions are very slow. Just call "memcpy" directly. Check how __hwasan_loadN is implemented. Move these to hwasan.cc and do the same. |
Addressed some of review comments
Unfortunately I don't know how to use memset from __hwasan_memset, given this comment in hwasan.cc
// ACHTUNG! No system header includes in this file.
I think it only matters for interceptors, where we need to redefine libc functions without knowing their exact signature. It should be OK to remove this comment an include <string.h>.
lib/hwasan/hwasan.cc | ||
---|---|---|
532 | This way -fsanitize-recover does not apply to mem intrinsics. I think, for consistency, there needs to be a __hwasan_memset_noabort variant, used in instrumentation when !Recover. |
please don't add system headers to this file.
instead, create a new file that will only contain __hwasan_mem* functions,
and sure, include what you need there.
lib/hwasan/hwasan.cc | ||
---|---|---|
532 | please also address this comment |
lib/hwasan/hwasan.cc | ||
---|---|---|
532 | I noticed that ASAN doesn't have noabort versions, instead mem intrinsic behavior is controlled by halt_on_error flag in runtme. How about doing the same here? |
lib/hwasan/hwasan.cc | ||
---|---|---|
532 | OK, sure. |
lib/hwasan/hwasan_memintrinsics.cc | ||
---|---|---|
29 ↗ | (On Diff #178454) | You don't need this - see HwasanOnSIGTRAP, always using ErrorAction::Recover should have the desired behavior. |
This way -fsanitize-recover does not apply to mem intrinsics. I think, for consistency, there needs to be a __hwasan_memset_noabort variant, used in instrumentation when !Recover.