[cxx-abi-dev] N3639 (arrays of runtime bound): __cxa_bad_array_length

Florian Weimer fweimer at redhat.com
Mon Apr 22 07:00:12 UTC 2013


On 04/21/2013 01:19 AM, Richard Smith wrote:
> N3639, which was voted into the C++14 committee draft today, adds a
> std::bad_array_length exception which an implementation is required to
> throw if the computed bound for a VLA ("array of runtime bound") is
> "erroneous".
>
> "erroneous" can be any of:
>   - bound <= 0
>   - bound > some implementation-defined limit
>   - bound < number of initializers provided

Do we want to throw an exception if the stack hasn't got sufficient 
space for the array?  Then we need a fundamentally different interface 
(probably a stack limit stored in a TLS variable or an alloca-like 
function).

I should probably askon the standards list what the expectations are.

-- 
Florian Weimer / Red Hat Product Security Team


More information about the cxx-abi-dev mailing list