← board

alloca(): dynamic stack allocation for the C frontend

Symptom

pascal26:15175: error: call to undeclared function: alloca ()

QuickJS uses alloca on its hottest paths — JS_CallInternal allocates the argument buffer and local frame with it (quickjs.c:5288, 14707, 14818, 14970), and libregexp sizes its capture stack with it (libregexp.c:2484). A malloc-backed shim is NOT acceptable here: every JS call would leak its frame.

Shape

Acceptance

Log