From: Brendan Hansen Date: Mon, 25 Jan 2021 14:39:12 +0000 (-0600) Subject: bug fix that crashed RemedyDB when debugging X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=37f6c4e5560f59b42dc12a0a25df1bb761ec5dd8;p=onyx.git bug fix that crashed RemedyDB when debugging probably due to stack overload and corrupting the stack frames. --- diff --git a/bin/onyx b/bin/onyx index ef115195..02dedce0 100755 Binary files a/bin/onyx and b/bin/onyx differ diff --git a/onyx.exe b/onyx.exe index 225bf424..3b67597b 100644 Binary files a/onyx.exe and b/onyx.exe differ diff --git a/src/onyxutils.c b/src/onyxutils.c index c8e76308..09a97de6 100644 --- a/src/onyxutils.c +++ b/src/onyxutils.c @@ -955,6 +955,7 @@ AstStructType* polymorphic_struct_lookup(AstPolyStructType* ps_type, bh_arr(AstP insert_poly_slns_into_scope(ps_type->scope, slns); AstStructType* concrete_struct = (AstStructType *) ast_clone(context.ast_alloc, ps_type->base_struct); + bh_table_put(AstStructType *, ps_type->concrete_structs, unique_key, concrete_struct); Entity struct_entity = { .state = Entity_State_Resolve_Symbols, @@ -982,8 +983,6 @@ AstStructType* polymorphic_struct_lookup(AstPolyStructType* ps_type, bh_arr(AstP return NULL; } - bh_table_put(AstStructType *, ps_type->concrete_structs, unique_key, concrete_struct); - Type* cs_type = type_build_from_ast(context.ast_alloc, (AstType *) concrete_struct); // CLEANUP: This should not be necessary since the only place this function can be