Does this code return an invalid reference to a variable allocated on the stack? Or what:
void *f(size_t sz) {
return alloca(sz);
}
Or is it a special case that is handled by the alloca implementation / compiler support like f(alloca(size), alloca(size)) would be?
allocaallocates space in the stack frame off. You can’t do anything useful with it once the function returns (it’s not “reserved” anymore).