[llvm] [llvm] Fix __builtin_object_size interaction between Negative Offset … (PR #111827)
Harald van Dijk via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 16 15:17:18 PDT 2024
hvdijk wrote:
> Actually if we report an offset as unknown, `__builtin_object_size` returns an error code (either 0 or -1 depending on its arguments) and the caller can handle that gracefully, so it's not an error.
That is true for `__builtin_object_size`, but `ObjectSizeOffsetEvaluator::visitGEPOperator` is not used for that, it is used for `__builtin_dynamic_object_size` (as well as some other `-fsanitize` options) which does handle unknown offsets. That is the one where I worry there may still be cases not caught.
https://github.com/llvm/llvm-project/pull/111827
More information about the llvm-commits
mailing list