sprof: check pread size and offset for overflow

Collin Funk collin.funk1@gmail.com
Fri Oct 17 00:17:59 GMT 2025


Paul Eggert <eggert@cs.ucla.edu> writes:

> On 2025-10-15 18:53, Collin Funk wrote:
>> glibc copies intprops.h from Gnulib, which has INT_ADD_WRAPV, but that
>> is just __builtin_add_overflow on all compilers glibc supports. CC'ed
>> Paul who can correct me if I am wrong.
>
> You're right.
>
> We could change glibc to use C23-style ckd_add, by adapting Gnulib's
> stdckdint.h machinery to glibc. (It uses intprops.h.)

That would be a nice change. We consider that in a seperate commit.

Collin


More information about the Libc-alpha mailing list