Siddhesh Poyarekar
authored
Don't bail out early if the offset to a pointer in __builtin_object_size
is a variable, return the wholesize instead since that is a better
fallback for maximum estimate. This should keep checks in place for
fortified functions to constrain overflows to at lesat some extent.
gcc/ChangeLog:
PR middle-end/77608
* tree-object-size.cc (plus_stmt_object_size): Drop check for
constant offset.
gcc/testsuite/ChangeLog:
* gcc.dg/builtin-object-size-1.c (test12): New test.
(main): Call it.
Signed-off-by:
Siddhesh Poyarekar <siddhesh@gotplt.org>
Name | Last commit | Last update |
---|