add a size check when declare a stack array to be less than 2048 bytes

This commit is contained in:
Shirui Cheng
2024-07-18 15:36:08 -07:00
committed by Qi Wang
parent 8dc97b1108
commit 48f66cf4a2
4 changed files with 11 additions and 7 deletions

View File

@@ -1896,7 +1896,7 @@ stats_print_helper(emitter_t *emitter, bool merged, bool destroyed,
size_t mib[3];
size_t miblen = sizeof(mib) / sizeof(size_t);
size_t sz;
VARIABLE_ARRAY(bool, initialized, narenas);
VARIABLE_ARRAY_UNSAFE(bool, initialized, narenas);
bool destroyed_initialized;
unsigned i, ninitialized;