From fa82d5470b9633b15b8a1612bd8846ddb712aeca Mon Sep 17 00:00:00 2001 From: erhan-mengusoglu Date: Mon, 11 May 2026 14:19:26 +0100 Subject: [PATCH] Update Exception.c Delete unnecessary stack usage which can cause issue when there is an unhandled exception. --- jni/jffi/Exception.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/jni/jffi/Exception.c b/jni/jffi/Exception.c index 884de97e..58622337 100644 --- a/jni/jffi/Exception.c +++ b/jni/jffi/Exception.c @@ -41,14 +41,11 @@ jffi_throwExceptionByName(JNIEnv* env, const char* exceptionName, const char* fm va_list ap; char buf[1024] = { 0 }; va_start(ap, fmt); - vsnprintf(buf, sizeof(buf) - 1, fmt, ap); - - (*env)->PushLocalFrame(env, 10); + vsnprintf(buf, sizeof(buf) - 1, fmt, ap); jclass exceptionClass = (*env)->FindClass(env, exceptionName); if (exceptionClass != NULL) { (*env)->ThrowNew(env, exceptionClass, buf); } - (*env)->PopLocalFrame(env, NULL); va_end(ap); }