[PATCH] D123010: [asan] Emit .size directive for global object size before redzone

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 8 10:16:02 PDT 2022


MaskRay added a comment.

Thinking this again, I think using the original st_size makes sense, but I do not agree with the justification put on the patch.
The original st_size makes sense because the size is the inherent property of the global variable and should not change due to error-catching instrumentation.
I.e. if the size 4 is grown to 6, the user application can only access [0,4), not [4,6).

Matching GCC behavior is very minor pros in this case (depending on cases, it may matter more). The copy relocations benefit is even minor and not worthwhile to be mentioned in LangRef.


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

https://reviews.llvm.org/D123010



More information about the llvm-commits mailing list