GNU bug report logs - #38388
[3.0.0] Inaccurate source location info for unbound variables

Previous Next

Package: guile;

Reported by: Ludovic Courtès <ludovic.courtes <at> inria.fr>

Date: Tue, 26 Nov 2019 15:21:01 UTC

Severity: normal

To reply to this bug, email your comments to 38388 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to wingo <at> igalia.com, bug-guile <at> gnu.org:
bug#38388; Package guile. (Tue, 26 Nov 2019 15:21:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ludovic Courtès <ludovic.courtes <at> inria.fr>:
New bug report received and forwarded. Copy sent to wingo <at> igalia.com, bug-guile <at> gnu.org. (Tue, 26 Nov 2019 15:21:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludovic.courtes <at> inria.fr>
To: bug-Guile <at> gnu.org
Subject: [2.9.5] Inaccurate source location info for unbound variables
Date: Tue, 26 Nov 2019 16:20:51 +0100
Hello,

I have a test that runs ‘guix system build’ on this file:

--8<---------------cut here---------------start------------->8---
(use-modules (gnu))                                   ; 1
(use-service-modules networking)                      ; 2

(operating-system                                     ; 4
  (host-name "antelope")                              ; 5
  (timezone "Europe/Paris")                           ; 6
  (locale "en_US.UTF-8")                              ; 7

  (bootloader (GRUB-config (target "/dev/sdX")))      ; 9
  (file-systems (cons (file-system
                        (device (file-system-label "root"))
                        (mount-point "/")
                        (type "ext4"))
                      %base-file-systems)))
--8<---------------cut here---------------end--------------->8---

Here, ‘GRUB-config’ is unbound, and the test expects to see a stack
frame corresponding to line 9.

However, the stack frame we get is for line 11, char 32, which
corresponds to (file-system-label "root").

So it would seem that the IP-to-source-location mapping is not quite
working as expected.

Thoughts?

Ludo’.




Information forwarded to bug-guile <at> gnu.org:
bug#38388; Package guile. (Wed, 27 Nov 2019 09:55:01 GMT) Full text and rfc822 format available.

Message #8 received at 38388 <at> debbugs.gnu.org (full text, mbox):

From: Andy Wingo <wingo <at> igalia.com>
To: Ludovic Courtès <ludovic.courtes <at> inria.fr>
Cc: 38388 <at> debbugs.gnu.org
Subject: Re: bug#38388: [2.9.5] Inaccurate source location info for unbound
 variables
Date: Wed, 27 Nov 2019 10:53:56 +0100
Hi,

On Tue 26 Nov 2019 16:20, Ludovic Courtès <ludovic.courtes <at> inria.fr> writes:

> I have a test that runs ‘guix system build’ on this file:
>
> (use-modules (gnu))                                   ; 1
> (use-service-modules networking)                      ; 2
>
> (operating-system                                     ; 4
>   (host-name "antelope")                              ; 5
>   (timezone "Europe/Paris")                           ; 6
>   (locale "en_US.UTF-8")                              ; 7
>
>   (bootloader (GRUB-config (target "/dev/sdX")))      ; 9
>   (file-systems (cons (file-system
>                         (device (file-system-label "root"))
>                         (mount-point "/")
>                         (type "ext4"))
>                       %base-file-systems)))
>
> Here, ‘GRUB-config’ is unbound, and the test expects to see a stack
> frame corresponding to line 9.
>
> However, the stack frame we get is for line 11, char 32, which
> corresponds to (file-system-label "root").
>
> So it would seem that the IP-to-source-location mapping is not quite
> working as expected.
>
> Thoughts?

What version is this with?

Unfortunately as you know, bare identifiers don't have good source
location information.  There are small improvements that can be made but
larger improvments are gnarly.  Could be this is a case for a small
improvement though!

Andy




Information forwarded to bug-guile <at> gnu.org:
bug#38388; Package guile. (Thu, 28 Nov 2019 08:22:02 GMT) Full text and rfc822 format available.

Message #11 received at 38388 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludovic.courtes <at> inria.fr>
To: Andy Wingo <wingo <at> igalia.com>
Cc: 38388 <at> debbugs.gnu.org
Subject: Re: bug#38388: [2.9.5] Inaccurate source location info for unbound
 variables
Date: Thu, 28 Nov 2019 09:20:58 +0100
Hello!

Andy Wingo <wingo <at> igalia.com> skribis:

> On Tue 26 Nov 2019 16:20, Ludovic Courtès <ludovic.courtes <at> inria.fr> writes:
>
>> I have a test that runs ‘guix system build’ on this file:
>>
>> (use-modules (gnu))                                   ; 1
>> (use-service-modules networking)                      ; 2
>>
>> (operating-system                                     ; 4
>>   (host-name "antelope")                              ; 5
>>   (timezone "Europe/Paris")                           ; 6
>>   (locale "en_US.UTF-8")                              ; 7
>>
>>   (bootloader (GRUB-config (target "/dev/sdX")))      ; 9
>>   (file-systems (cons (file-system
>>                         (device (file-system-label "root"))
>>                         (mount-point "/")
>>                         (type "ext4"))
>>                       %base-file-systems)))
>>
>> Here, ‘GRUB-config’ is unbound, and the test expects to see a stack
>> frame corresponding to line 9.
>>
>> However, the stack frame we get is for line 11, char 32, which
>> corresponds to (file-system-label "root").
>>
>> So it would seem that the IP-to-source-location mapping is not quite
>> working as expected.
>>
>> Thoughts?
>
> What version is this with?

The wrong location info is with 2.9.5.  2.2.x (and 2.0.x) work fine.

Any idea where I should poke for debugging?

> Unfortunately as you know, bare identifiers don't have good source
> location information.  There are small improvements that can be made but
> larger improvments are gnarly.  Could be this is a case for a small
> improvement though!

I know, that’s why this test checks a favorable case (symbol wrapped in
an sexp).  So I agree this would be a welcome improvement, but I think
it’s unnecessary for the purposes of the use case above.

Thanks,
Ludo’.




Information forwarded to bug-guile <at> gnu.org:
bug#38388; Package guile. (Fri, 29 Nov 2019 11:05:01 GMT) Full text and rfc822 format available.

Message #14 received at 38388 <at> debbugs.gnu.org (full text, mbox):

From: Andy Wingo <wingo <at> igalia.com>
To: Ludovic Courtès <ludovic.courtes <at> inria.fr>
Cc: 38388 <at> debbugs.gnu.org
Subject: Re: bug#38388: [2.9.5] Inaccurate source location info for unbound
 variables
Date: Fri, 29 Nov 2019 12:04:24 +0100
On Thu 28 Nov 2019 09:20, Ludovic Courtès <ludovic.courtes <at> inria.fr> writes:

>>> I have a test that runs ‘guix system build’ on this file:
>>>
>>> (use-modules (gnu))                                   ; 1
>>> (use-service-modules networking)                      ; 2
>>>
>>> (operating-system                                     ; 4
>>>   (host-name "antelope")                              ; 5
>>>   (timezone "Europe/Paris")                           ; 6
>>>   (locale "en_US.UTF-8")                              ; 7
>>>
>>>   (bootloader (GRUB-config (target "/dev/sdX")))      ; 9
>>>   (file-systems (cons (file-system
>>>                         (device (file-system-label "root"))
>>>                         (mount-point "/")
>>>                         (type "ext4"))
>>>                       %base-file-systems)))
>>>
>>> Here, ‘GRUB-config’ is unbound, and the test expects to see a stack
>>> frame corresponding to line 9.
>>>
>>> However, the stack frame we get is for line 11, char 32, which
>>> corresponds to (file-system-label "root").
>
> Any idea where I should poke for debugging?

Sure would be nice to reduce the test case!  Once you have reduced it, I
would first look at the result of ,expand on this form.  If it looks the
same as in 2.2, then perhaps the CPS layer is at fault.  Could be we're
dropping an important source location somewher.

Andy




Changed bug title to '[3.0.0] Inaccurate source location info for unbound variables' from '[2.9.5] Inaccurate source location info for unbound variables' Request was from Ludovic Courtès <ludo <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 22 Jan 2020 14:15:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-guile <at> gnu.org:
bug#38388; Package guile. (Sat, 07 Mar 2020 16:08:01 GMT) Full text and rfc822 format available.

Message #19 received at 38388 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: 38388 <at> debbugs.gnu.org,  Andy Wingo <wingo <at> igalia.com>
Subject: Re: bug#38388: [2.9.5] Inaccurate source location info for unbound
 variables
Date: Sat, 07 Mar 2020 17:06:56 +0100
Hi,

Ludovic Courtès <ludovic.courtes <at> inria.fr> skribis:

> I have a test that runs ‘guix system build’ on this file:
>
> (use-modules (gnu))                                   ; 1
> (use-service-modules networking)                      ; 2
>
> (operating-system                                     ; 4
>   (host-name "antelope")                              ; 5
>   (timezone "Europe/Paris")                           ; 6
>   (locale "en_US.UTF-8")                              ; 7
>
>   (bootloader (GRUB-config (target "/dev/sdX")))      ; 9
>   (file-systems (cons (file-system
>                         (device (file-system-label "root"))
>                         (mount-point "/")
>                         (type "ext4"))
>                       %base-file-systems)))
>
> Here, ‘GRUB-config’ is unbound, and the test expects to see a stack
> frame corresponding to line 9.
>
> However, the stack frame we get is for line 11, char 32, which
> corresponds to (file-system-label "root").

I can’t say I got to the bottom of why we got this weird line number,
but commit d3a775ff10cbd0e14af38d6f900a7538db89bd90 solves this specific
issue.

Ludo’.




This bug report was last modified 4 years and 21 days ago.

Previous Next


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