From 4b1e9d8f92aa948f8ecccf364edcb911a135f2c8 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Tue, 23 Jan 2018 20:54:02 -0500 Subject: alloca seems buggy on M4 --- extmod/modure.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'extmod') diff --git a/extmod/modure.c b/extmod/modure.c index 78de4706d..3358b8e21 100644 --- a/extmod/modure.c +++ b/extmod/modure.c @@ -144,7 +144,7 @@ STATIC mp_obj_t re_split(size_t n_args, const mp_obj_t *args) { } mp_obj_t retval = mp_obj_new_list(0, NULL); - const char **caps = alloca(caps_num * sizeof(char*)); + const char* caps[caps_num]; while (true) { // cast is a workaround for a bug in msvc: it treats const char** as a const pointer instead of a pointer to pointer to const char memset((char**)caps, 0, caps_num * sizeof(char*)); -- cgit v1.2.3