From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Newsgroups: gmane.lisp.guile.bugs Subject: bug#43326: [3.0.x] Regression: Compilation error involving strings Date: Fri, 11 Sep 2020 14:37:43 +0200 Message-ID: <20200911123743.GB15934@tuxteam.de> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gatW/ieO32f1wygP" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34251"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/1.5.21 (2010-09-15) To: 43326@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Fri Sep 11 14:38:19 2020 Return-path: Envelope-to: guile-bugs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kGiJm-0008oY-ME for guile-bugs@m.gmane-mx.org; Fri, 11 Sep 2020 14:38:18 +0200 Original-Received: from localhost ([::1]:52032 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGiJl-00074h-P9 for guile-bugs@m.gmane-mx.org; Fri, 11 Sep 2020 08:38:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35572) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGiJX-0006qv-AI for bug-guile@gnu.org; Fri, 11 Sep 2020 08:38:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59538) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kGiJX-0001g9-1Q for bug-guile@gnu.org; Fri, 11 Sep 2020 08:38:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kGiJW-0006ZG-V6 for bug-guile@gnu.org; Fri, 11 Sep 2020 08:38:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Fri, 11 Sep 2020 12:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43326 X-GNU-PR-Package: guile X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.159982788225237 (code B ref -1); Fri, 11 Sep 2020 12:38:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 11 Sep 2020 12:38:02 +0000 Original-Received: from localhost ([127.0.0.1]:42850 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kGiJV-0006Yp-OX for submit@debbugs.gnu.org; Fri, 11 Sep 2020 08:38:02 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:46214) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kGiJR-0006YY-Tp for submit@debbugs.gnu.org; Fri, 11 Sep 2020 08:38:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35554) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGiJR-0006qd-Gt for bug-guile@gnu.org; Fri, 11 Sep 2020 08:37:57 -0400 Original-Received: from mail.tuxteam.de ([5.199.139.25]:32815) by eggs.gnu.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.90_1) (envelope-from ) id 1kGiJP-0001fS-GV for bug-guile@gnu.org; Fri, 11 Sep 2020 08:37:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=From:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:To:Date; bh=XKeP2fYVrem/1fO47aaiGj0mt7ALW459lbKyE4u8ZH8=; b=Fu13SzZ5dmhWgy6A1EFY/+zs0sIv3WH4EMK8dNtgGKpTjMmCy7+4Ke2OsfEjP9pSkibtQNMSxaYU48ovMFPntlG6EHuJ9noZjR+KSd6numV9WpvL85fg5RWTQVrfYYoXNzsFXJUJLFCoteITn+09CZrqVNSh2lLOp7kJbWh1iq0dOIL5kwRRDwHNuTunuZ9+CwRSm7oRKUv6fX6GNV/NV9tbWiiAFS6G0a4TTcFNxMHhXAJwvNCeGrk/0S2dqKhlVgcPei8Hk5IvKK1xxD9S2hwmFnWMb80uH5yZrFAwA8hbhstdHgBxp/3oKkB6hshjhiokjSX4+/7ZoB0eG5V0Tw==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.80) (envelope-from ) id 1kGiJD-0004Mp-FJ for bug-guile@gnu.org; Fri, 11 Sep 2020 14:37:43 +0200 Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=5.199.139.25; envelope-from=tomas@tuxteam.de; helo=mail.tuxteam.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/11 08:27:04 X-ACL-Warn: Detected OS = Linux 3.1-3.10 [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.io gmane.lisp.guile.bugs:9881 Archived-At: --gatW/ieO32f1wygP Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 11, 2020 at 03:31:24PM +0700, Erik Dominikus wrote: > Dear author(s) of the Guile 3.0.x compiler, >=20 > 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. >=20 > I have traced and reduced the problem into the minimal example below. >=20 > Some tested versions: > - affected: 3.0.2 and 3.0.4 > - not affected: 2.0.13 >=20 > How to reproduce: > - Download the attached compile-error.scm into your working directory. > - Run in Bash: GUILE_AUTO_COMPILE=3D0 guile -s compile-error.scm >=20 > Expected result: #t >=20 > Actual result: #f >=20 > Thank you. >=20 > Best regards, >=20 > Erik > ;; GUILE_AUTO_COMPILE=3D0 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 --gatW/ieO32f1wygP Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAl9bb5cACgkQBcgs9XrR2kbdSwCeJwpIzpKniqsNiCFBJEzemvm6 ggsAniPcFW7XvBKUA0xvtOenXT9E5ieG =FMwy -----END PGP SIGNATURE----- --gatW/ieO32f1wygP--