Details by WPB (1391):

VLAs use new library functions “__rt_allocauto” and “__rt_freeauto”. In
the future these could be improved to make sure VLAs are freed
correctly in longjmp-type situations, by associating blocks with stack
chunk and stack pointer values.

In principle, it’s just a matter of over-allocating memory within
__rt_allocauto and using the extra space to construct a wrapper which
includes a linked list pointer so it can be located from the stack chunk
header, plus the stack pointer that was pertinent at allocation time;
then when you longjmp back up the stack, iterate over stack chunks and
auto-alloced blocks that belonged to skipped stack frames, and free them.

Changelog:

Modified by Ben Avison (25) Sun, March 09 2014 - 21:24:56 GMT

It looks like you’re confusing two different issues there. I think the unsatisfied call to __arm_alloca_longjmp must have been inserted by GCC? It’s not part of the Norcroft / shared C library VLA support routines, and it’s also not explicitly referenced in the OSLib source code. If OSLibSupport:o.OSLibSupport32 was compiled using GCC (I’m not sure how it was generated) you might want to try recompiling it using Norcroft to avoid this.

I’m also changing the “Part” that this fault applies to, since __rt_allocauto and __rt_freeauto are functions in the shared C library, not the toolchain – see kernel.s.k_body.