Skip to content

Commit

Permalink
Workaround for free crash in LLVM.
Browse files Browse the repository at this point in the history
  • Loading branch information
elliottslaughter committed Aug 25, 2023
1 parent e358c33 commit c5e8dfa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/tcompiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3679,7 +3679,10 @@ static int terra_deletefunction(lua_State *L) {
VERBOSE_ONLY(CU->T) {
printf("... uses not empty, removing body but keeping declaration.\n");
}
#if LLVM_VERSION < 150
// FIXME: LLVM crashes if we attempt to delete with opaque pointers enabled
func->deleteBody();
#endif
VERBOSE_ONLY(CU->T) { printf("... finish delete.\n"); }
fstate->func = NULL;
freecompilationunit(CU);
Expand Down

0 comments on commit c5e8dfa

Please sign in to comment.