Stagefrightening
Stagefrightening
Posted Aug 1, 2015 23:56 UTC (Sat) by mathstuf (subscriber, #69389)In reply to: Stagefrightening by error27
Parent article: Stagefrightening
Sounds like something worth a __builtin_will_overflow function to explicitly denote such uses.
Posted Aug 2, 2015 11:14 UTC (Sun)
by kleptog (subscriber, #1183)
[Link] (2 responses)
See: https://gcc.gnu.org/onlinedocs/gcc/Integer-Overflow-Built...
Other compilers have similar features: https://msdn.microsoft.com/en-us/library/windows/desktop/...
It's not these these features don't exist, it's that (a) they're not standardised and (b) people aren't using them.
Posted Aug 2, 2015 13:03 UTC (Sun)
by mathstuf (subscriber, #69389)
[Link] (1 responses)
> It's not these these features don't exist, it's that (a) they're not standardised
Why would this matter for, at least, the kernel?
Posted Aug 3, 2015 21:08 UTC (Mon)
by kleptog (subscriber, #1183)
[Link]
>Why would this matter for, at least, the kernel?
For the kernel it doesn't matter so much, other than it's new (GCC 5.0 new to be precise). But you could probably whip these up in an afternoon in assembly if you wanted to, I think it's telling that this hasn't happened. You don't need compiler support to make these functions, it just makes it easier. The kernel devs could have implemented it years ago if they wanted to.
For all user space applications not being standardised makes it hard because you'd really rather not rely on special compiler features.
Posted Aug 2, 2015 11:31 UTC (Sun)
by PaXTeam (guest, #24616)
[Link]
http://clang.llvm.org/docs/LanguageExtensions.html#checke...
Stagefrightening
Stagefrightening
Stagefrightening
Stagefrightening
https://gcc.gnu.org/onlinedocs/gcc/Integer-Overflow-Built...
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61129