From 506ba5c0404c5ccf33185aa023e3b4b614de9eef Mon Sep 17 00:00:00 2001 From: Po Lu Date: Tue, 22 Aug 2023 10:43:58 +0800 Subject: [PATCH] * etc/DEBUG: Mention android_exception_check specifics. (bug#65445) --- etc/DEBUG | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/etc/DEBUG b/etc/DEBUG index 7c54b488cad..08b7c73c829 100644 --- a/etc/DEBUG +++ b/etc/DEBUG @@ -1279,6 +1279,24 @@ code. To this end, the `--jdb' option will attach the Java debugger instead of gdbserver. Lametably, it seems impossible to debug both C and Java code in concert. +C code within Emacs rigorously checks for Java exceptions after +calling any JVM function that may signal an out-of-memory error, +employing one of the android_exception_check(_N) functions defined +within android.c for this purpose. These functions operate presuming +the preceding Java code does not signal exceptions of their own, and +report out-of-memory errors upon any type of exception, not just OOM +errors. + +If Emacs protests that it is out of memory, yet you witness a +substantial amount of free space remaining, search the log buffer for +a string containing: + + "Possible out of memory error. The Java exception follows:" + +subsequent to which a reproduction of the exception precipitating the +spurious OOM error should be located. This exception is invariably +indicative of a bug within Emacs that should be fixed. + This file is part of GNU Emacs. -- 2.39.2