GNU bug report logs - #43326
[3.0.x] Regression: Compilation error involving strings

Previous Next

Package: guile;

Reported by: Erik Dominikus <erik.dominikus71 <at> gmail.com>

Date: Fri, 11 Sep 2020 08:43:02 UTC

Severity: normal

To reply to this bug, email your comments to 43326 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 bug-guile <at> gnu.org:
bug#43326; Package guile. (Fri, 11 Sep 2020 08:43:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Erik Dominikus <erik.dominikus71 <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Fri, 11 Sep 2020 08:43:02 GMT) Full text and rfc822 format available.

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

From: Erik Dominikus <erik.dominikus71 <at> gmail.com>
To: bug-guile <at> gnu.org
Subject: [3.0.x] Regression: Compilation error involving strings
Date: Fri, 11 Sep 2020 15:31:24 +0700
[Message part 1 (text/plain, inline)]
Dear author(s) of the Guile 3.0.x compiler,

Background: I would like to report a problem that I found while trying
to write a simple web server with get-string-n, sxml simple, and web
server.

I have traced and reduced the problem into the minimal example below.

Some tested versions:
- affected: 3.0.2 and 3.0.4
- not affected: 2.0.13

How to reproduce:
- Download the attached compile-error.scm into your working directory.
- Run in Bash: GUILE_AUTO_COMPILE=0 guile -s compile-error.scm

Expected result: #t

Actual result: #f

Thank you.

Best regards,

Erik
[compile-error.scm (text/x-scheme, attachment)]

Information forwarded to bug-guile <at> gnu.org:
bug#43326; Package guile. (Fri, 11 Sep 2020 12:38:02 GMT) Full text and rfc822 format available.

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

From: <tomas <at> tuxteam.de>
To: bug-guile <at> gnu.org
Subject: Re: bug#43326: [3.0.x] Regression: Compilation error involving strings
Date: Fri, 11 Sep 2020 14:37:43 +0200
[Message part 1 (text/plain, inline)]
On Fri, Sep 11, 2020 at 03:31:24PM +0700, Erik Dominikus wrote:
> Dear author(s) of the Guile 3.0.x compiler,
> 
> Background: I would like to report a problem that I found while trying
> to write a simple web server with get-string-n, sxml simple, and web
> server.
> 
> I have traced and reduced the problem into the minimal example below.
> 
> Some tested versions:
> - affected: 3.0.2 and 3.0.4
> - not affected: 2.0.13
> 
> How to reproduce:
> - Download the attached compile-error.scm into your working directory.
> - Run in Bash: GUILE_AUTO_COMPILE=0 guile -s compile-error.scm
> 
> Expected result: #t
> 
> Actual result: #f
> 
> Thank you.
> 
> Best regards,
> 
> Erik

> ;; GUILE_AUTO_COMPILE=0 guile -s compile-error.scm
> (define code '(lambda ()
>                 (define a (string #\x #\y))
>                 (define b (substring/shared a 0 1))
>                 (string-ref b 0)))
> (define compiled (compile code))
> (define interped (eval code (interaction-environment)))
> (write (equal? (compiled) (interped))) ;; #\nul vs #\x
> (newline)

Interesting: replacing "substring/shared" with just "substring" seems
to "fix" it (FWIW: the compiled version with "substring/shared" returns
"#\nul" (unexpected, for me), whereas the one with just "substring"
returns "#\x" (expected).

Cheers
 - t
[signature.asc (application/pgp-signature, inline)]

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

Previous Next


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