Harald van Dijk
Harald van Dijk
I'm happy to accept that there may be a serious awareness problem. Let me put it differently, without making possibly unwarranted assumptions on the intentions of the posters: the accounts...
If I apply this PR locally, although I no longer see the UBSan error, I still get a number of differences in `__builtin_object_size` between Clang and GCC when I change...
> We're allowed to have a different behavior than GCC if we produce accurate result instead of -1/0. Otherwise that's probably an error. Would you mind sharing the differences? Sure....
Yeah, I think you're right that 12 is the correct result in that test. Your updated PR looks good to me at a quick glance, thanks! I'll do some additional...
The PR makes it so that `ObjectSizeOffsetVisitor::visitPHINode` can return different results for the same PHI node when called with a different `ConstantOffset`, but that seems like it would interfere with...
Thanks for pointing me to `Type = 3` just not being generally supported, and I agree with your explanation of why the caching should be a non-issue. Unfortunately, more testing...
I'm still a bit wary: since this relies on the offset being known, since we get incorrect results if the offset isn't known, it suggests to me that if we...
> 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...
And now I do have a testcase: ```c++ #include int x, i = -1; int main() { int array1[4]; int array2[8]; int *ptr; if (x) { ptr = array1; }...
The return value is unsigned and printing it as signed makes it trickier to explain what values are correct: instead of 20 or greater, it's 20 or greater, or negative,...