[Bug sanitizer/68065] Size calculations for VLAs can overflow
joseph at codesourcery dot com
gcc-bugzilla@gcc.gnu.org
Fri Nov 20 01:06:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68065
--- Comment #34 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
On Thu, 19 Nov 2015, ch3root at openwall dot com wrote:
> What does the following mean then?
>
> C11, 4p5:
> "A strictly conforming program[...] It [...] shall not exceed any
> minimum implementation limit."
It's well-known that, if you read the standard literally, strictly
conforming programs may not exist; too much is unspecified or
implementation-defined (including, in general, limits on supported
programs; cf 1#2 "This International Standard does not specify ... the
size or complexity of a program and its data that will exceed the capacity
of any specific data-processing system or the capacity of a particular
processor").
In general, you can only reason about C programs conditional on the
program not exceeding any implementation limit.
More information about the Gcc-bugs
mailing list