unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#43326: [3.0.x] Regression: Compilation error involving strings
@ 2020-09-11  8:31 Erik Dominikus
  2020-09-11 12:37 ` tomas
  0 siblings, 1 reply; 2+ messages in thread
From: Erik Dominikus @ 2020-09-11  8:31 UTC (permalink / raw)
  To: 43326

[-- Attachment #1: Type: text/plain, Size: 564 bytes --]

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

[-- Attachment #2: compile-error.scm --]
[-- Type: text/x-scheme, Size: 361 bytes --]

;; 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)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#43326: [3.0.x] Regression: Compilation error involving strings
  2020-09-11  8:31 bug#43326: [3.0.x] Regression: Compilation error involving strings Erik Dominikus
@ 2020-09-11 12:37 ` tomas
  0 siblings, 0 replies; 2+ messages in thread
From: tomas @ 2020-09-11 12:37 UTC (permalink / raw)
  To: 43326

[-- 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 --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-09-11 12:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-11  8:31 bug#43326: [3.0.x] Regression: Compilation error involving strings Erik Dominikus
2020-09-11 12:37 ` tomas

unofficial mirror of bug-guile@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guile-bugs/0 guile-bugs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guile-bugs guile-bugs/ https://yhetil.org/guile-bugs \
		bug-guile@gnu.org
	public-inbox-index guile-bugs

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.lisp.guile.bugs
	nntp://news.gmane.io/gmane.lisp.guile.bugs


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git