Subject: Re: 27.0.60; Assertion failed during compilation

From: Paul Eggert <[email-masked]>
Date: Mon, 17 Feb 2020 12:53:05 -0800

I installed the attached patch into master, to work around the 
getloadavg-related assertion failure. However, I don't think this fixes the 
actual bug.

> This android version does not have getloadavg (so I guess
> lib/getloadavg.c is used instead?)

If so, you should be able to step through the replacement getloadavg and see why 
it's reporting bogus values. I have the sneaking suspicion that floating point 
isn't working properly, and that it's treating tiny numbers as NaNs or vice 
versa. But this bug is relatively unimportant.

The main problem here seems to be the sigsetjmp-related bug. You might try 
putting a breakpoint on handle_sigsegv before running Emacs; that might give you 
a better backtrace.
>From 121f9bb14ab0abe618cabd24bd25ed328e36891c Mon Sep 17 00:00:00 2001
From: Paul Eggert <[email-masked]>
Date: Mon, 17 Feb 2020 12:44:10 -0800
Subject: [PATCH] Avoid unlikely load-average bug

* src/fns.c (Fload_average): Do not crash or return nonsense
if the load average exceeds most-positive-fixnum/100 (Bug#39577).
---
 src/fns.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/fns.c b/src/fns.c
index 436ef1c7b7..80012fa9d2 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -2843,7 +2843,7 @@ advisable.  */)
   while (loads-- > 0)
     {
       Lisp_Object load = (NILP (use_floats)
-			  ? make_fixnum (100.0 * load_ave[loads])
+			  ? double_to_integer (100.0 * load_ave[loads])
 			  : make_float (load_ave[loads]));
       ret = Fcons (load, ret);
     }
-- 
2.17.1