GNU bug report logs - #42360
[feature/native-comp] miscompilation(?) of functions with non local exits

Previous Next

Package: emacs;

Reported by: Andrea Corallo <akrl <at> sdf.org>

Date: Wed, 15 Jul 2020 08:25:02 UTC

Severity: normal

Done: Andrea Corallo <akrl <at> sdf.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Andrea Corallo <akrl <at> sdf.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#42360: closed ([feature/native-comp] miscompilation(?) of
 functions with non local exits)
Date: Thu, 16 Jul 2020 19:48:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Thu, 16 Jul 2020 19:47:30 +0000
with message-id <xjfo8offdil.fsf <at> sdf.org>
and subject line Re: bug#42360: [feature/native-comp] miscompilation(?) of functions with non local exits
has caused the debbugs.gnu.org bug report #42360,
regarding [feature/native-comp] miscompilation(?) of functions with non local exits
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
42360: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=42360
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Andrea Corallo <akrl <at> sdf.org>
To: bug-gnu-emacs <at> gnu.org
Cc: Eli Zaretskii <eliz <at> gnu.org>, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: [feature/native-comp] miscompilation(?) of functions with non local
 exits
Date: Wed, 15 Jul 2020 08:24:00 +0000
Due to a recent modification native-comp is (probably?) miscompiling
lexical scope functions with non local exits if they involve code with
side effect on local variables.  Before fixing I prefer to double check
the correct behavior we want.

Considering the following piece of (lexical scoped) code:

===
(let (x)
  (ignore-errors
    (setq x t)
    (error "foo"))
  x)
===

Three options:

  1- Because setq is evaluated the expression should always evaluate to
  t.

  2- Unwinding the original state of the stack is restored, when it was
  saved 'x' was nil so the expression should evaluate to nil.

  3- This is unspecified.

The current stock implementaion does always 1 so I'm prone to just go
for it but I wanted to double check to be on the safe side.

FYI 1 implies C register variables cannot be used to implement Lisp
local variable if non local exits are present.

Thanks

  Andrea

--
akrl <at> sdf.org


[Message part 3 (message/rfc822, inline)]
From: Andrea Corallo <akrl <at> sdf.org>
To: 42360-done <at> debbugs.gnu.org
Cc: eliz <at> gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#42360: [feature/native-comp] miscompilation(?) of functions
 with non local exits
Date: Thu, 16 Jul 2020 19:47:30 +0000
Right I think we can close this.

Thanks

  Andrea

-- 
akrl <at> sdf.org


This bug report was last modified 5 years and 37 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.