unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Henrik Grimler <henrik@grimler.se>
Cc: 39577@debbugs.gnu.org
Subject: bug#39577: 27.0.60; Assertion failed during compilation
Date: Mon, 17 Feb 2020 12:53:05 -0800	[thread overview]
Message-ID: <3a007a4f-4d7d-2d86-e670-7bcf5e6b31dd@cs.ucla.edu> (raw)
In-Reply-To: <20200212073922.GA2812@localhost>

[-- Attachment #1: Type: text/plain, Size: 717 bytes --]

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.

[-- Attachment #2: 0001-Avoid-unlikely-load-average-bug.patch --]
[-- Type: text/x-patch, Size: 799 bytes --]

From 121f9bb14ab0abe618cabd24bd25ed328e36891c Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
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


  parent reply	other threads:[~2020-02-17 20:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-12  7:39 bug#39577: 27.0.60; Assertion failed during compilation Henrik Grimler
2020-02-13 14:57 ` Eli Zaretskii
2020-02-13 19:00   ` Henrik Grimler
2020-02-13 19:23     ` Eli Zaretskii
2020-02-13 20:04       ` Henrik Grimler
2020-02-17 20:53 ` Paul Eggert [this message]
2020-02-18 15:49   ` Henrik Grimler
2020-09-01 17:25     ` Stefan Kangas
2020-10-01 19:09       ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3a007a4f-4d7d-2d86-e670-7bcf5e6b31dd@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=39577@debbugs.gnu.org \
    --cc=henrik@grimler.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).