Better handling of integer wraparound in the kernel
Better handling of integer wraparound in the kernel
Posted Jan 27, 2024 16:17 UTC (Sat) by donald.buczek (subscriber, #112892)In reply to: Better handling of integer wraparound in the kernel by adobriyan
Parent article: Better handling of integer wraparound in the kernel
> Using size_t is obvious mistake.
In "overflow: Expand check_add_overflow() for pointer addition"? Where exactly?
> __builtin_add_overflow_p(a, b, (typeof(0 ? a : b))0)
clang does not seem to have that builtin.
Why do you use `typeof(0 ? a : b)` instead of `typeof(a + b)` ?
