unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#39601: srfi library naming in r7rs
@ 2020-02-14 14:48 Duy Nguyen
  2021-05-15 17:44 ` Taylan Kammer
  0 siblings, 1 reply; 6+ messages in thread
From: Duy Nguyen @ 2020-02-14 14:48 UTC (permalink / raw)
  To: 39601

I'm running Guile 3.0.0 and very new to Guile. Forgive me if this is
not the right place to report (or whether I should do more search,
where?, before reporting)

It seems like in r7rs mode, srfi libraries are still named in "Guile
style", (srfi srfi-1). I can't find a place in r7rs-small to spell out
"srfi followed by a number". But it seems every other r7rs scheme goes
with (srfi 1) instead. Should Guile support this naming convention as
well? It certainly makes it easier to reuse external libraries.
-- 
Duy





^ permalink raw reply	[flat|nested] 6+ messages in thread
* bug#51264: Calling ‘texi-fragment->stexi’ in parallel leads to crashes
@ 2021-10-18 12:54 Ludovic Courtès
  2021-11-01 17:52 ` bug#39601: srfi library naming in r7rs lloda
  0 siblings, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2021-10-18 12:54 UTC (permalink / raw)
  To: 51264

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

Hello!

I just stumbled upon this bug (here I use Guix to feed Texinfo strings
but I suppose we could reduce the test case to be Guix-less.)

Test case:


[-- Attachment #2: the test case --]
[-- Type: text/plain, Size: 588 bytes --]

(use-modules (guix) (gnu) (texinfo)
             (ice-9 threads))

(define sequential? (getenv "SEQUENTIAL"))

(define (for-each/maybe-parallel proc lst)
  (if (pk 'sequential? sequential?)
      (for-each proc lst)
      (n-par-for-each 10 proc lst)))

(for-each/maybe-parallel
 (lambda (package)
   (and=> (package-description package)
          (lambda (str)
            (catch 'parser-error
              (lambda ()
                (texi-fragment->stexi str))
              (lambda args
                (pk 'bah! args)
                (error "failed"))))))
 (fold-packages cons '()))

[-- Attachment #3: Type: text/plain, Size: 1342 bytes --]


This code crashes when using ‘n-par-for-each’ but passes when run
sequentially:

--8<---------------cut here---------------start------------->8---
$ guix time-machine --commit=9cda21cf20a5c9bdf97e3a6d6c8f901fc3e4307d -- repl -- bug-texi-parser-parallel.scm

;;; (sequential? #f)

;;; (bah! (parser-error #f "Unknown command" codeand))
In thread:
failed

;;; (bah! (parser-error #f "Unknown command" endm))
In thread:
failed

;;; (bah! (parser-error #f "Unknown command" cod))
In thread:
failed

;;; (bah! (parser-error #f "Unknown command" comm))
In thread:
failed

;;; (bah! (parser-error #f "Unknown command" enum))
In thread:
failed

;;; (bah! (parser-error #f "Unknown command" cod))
In thread:
failed

;;; (bah! (parser-error #f "Unknown command" enem))
In thread:
failed


;;; (bah! (parser-error #f "Unknown command" endmand))
In thread:
failed
;;;;; (bah! (parser-error #f "Unknown command" eomm))
In thread:
failed
$ SEQUENTIAL=y guix time-machine --commit=9cda21cf20a5c9bdf97e3a6d6c8f901fc3e4307d -- repl -- bug-texi-parser-parallel.scm

;;; (sequential? "y")
$ guix repl -- <(echo '(pk (version))')

;;; ("3.0.7")
--8<---------------cut here---------------end--------------->8---

The bits shown in the ‘parser-error’ arguments suggests memory
corruption.

Ludo’.

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

end of thread, other threads:[~2021-11-03  7:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-14 14:48 bug#39601: srfi library naming in r7rs Duy Nguyen
2021-05-15 17:44 ` Taylan Kammer
  -- strict thread matches above, loose matches on Subject: below --
2021-10-18 12:54 bug#51264: Calling ‘texi-fragment->stexi’ in parallel leads to crashes Ludovic Courtès
2021-11-01 17:52 ` bug#39601: srfi library naming in r7rs lloda
2021-11-01 18:42   ` Taylan Kammer
2021-11-02 17:53     ` lloda
2021-11-03  7:37     ` Linus Björnstam

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