From: <tomas@tuxteam.de>
To: 43326@debbugs.gnu.org
Subject: bug#43326: [3.0.x] Regression: Compilation error involving strings
Date: Fri, 11 Sep 2020 14:37:43 +0200 [thread overview]
Message-ID: <20200911123743.GB15934@tuxteam.de> (raw)
In-Reply-To: <CAOopUjnPRTVqrdxce4MJxsRzvgzeU0SmP4r-zQUYqW3Zy6o7mQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1352 bytes --]
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
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
prev parent reply other threads:[~2020-09-11 12:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-11 8:31 bug#43326: [3.0.x] Regression: Compilation error involving strings Erik Dominikus
2020-09-11 12:37 ` tomas [this message]
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/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200911123743.GB15934@tuxteam.de \
--to=tomas@tuxteam.de \
--cc=43326@debbugs.gnu.org \
/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.
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).