From c2346742e84b32710291c54154df732d25b06840 Mon Sep 17 00:00:00 2001 From: "Edward A. Lee" Date: Wed, 16 Oct 2024 16:37:34 -0700 Subject: [PATCH] Do not call Py_FinalizeEx() on failure --- .../org/lflang/generator/python/PythonReactionGenerator.java | 3 +-- core/src/main/resources/lib/c/reactor-c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/org/lflang/generator/python/PythonReactionGenerator.java b/core/src/main/java/org/lflang/generator/python/PythonReactionGenerator.java index 528ec85bf8..d0a1bffac7 100644 --- a/core/src/main/java/org/lflang/generator/python/PythonReactionGenerator.java +++ b/core/src/main/java/org/lflang/generator/python/PythonReactionGenerator.java @@ -118,8 +118,7 @@ private static String generateCPythonFunctionCaller( + " code again", " }", " " + PyUtil.generateGILReleaseCode(), - " Py_FinalizeEx();", - " exit(1);", + " exit(1);", // NOTE: Used to call Py_FinalizeEx() before exit, but it segfaults. "}", "", "/* Release the thread. No Python API allowed beyond this point. */", diff --git a/core/src/main/resources/lib/c/reactor-c b/core/src/main/resources/lib/c/reactor-c index 0031be283f..184567d3bd 160000 --- a/core/src/main/resources/lib/c/reactor-c +++ b/core/src/main/resources/lib/c/reactor-c @@ -1 +1 @@ -Subproject commit 0031be283fb3bf1cb6561fe0cb2c9604ecbb0ef1 +Subproject commit 184567d3bd06ae5c5f8a75a0b51093115e7fbe52