GNU bug report logs - #14404
regexp_exec thread-unsafe

Previous Next

Package: guile;

Reported by: ludo <at> gnu.org (Ludovic Courtès)

Date: Tue, 14 May 2013 21:23:02 UTC

Severity: normal

Full log


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

From: ludo <at> gnu.org (Ludovic Courtès)
To: 14404 <at> debbugs.gnu.org
Subject: Re: regexp_exec thread-unsafe
Date: Wed, 15 May 2013 09:34:03 +0200
And here’s a reduced test case that “works” quite well on Guile 2.0.9:

--8<---------------cut here---------------start------------->8---
(use-modules (ice-9 threads)
             (ice-9 regex)
             (web uri)
             (srfi srfi-1)
             (srfi srfi-26))

(let ((do-regexps (lambda ()
                    (define seed1 (random 100000))
                    (define seed2 (random 100000))
                    (let loop ()
                      (let ((p (make-regexp "^http://([^/]+)/(.*)$"))
                            (s (string-append
                                "http://" (number->string seed1)
                                "hydra.gnu.org/nar/0did57blsaaspj49cl3q8nnydm5pr1qg-cflow-1.4"
                                (number->string seed2))))
                        (or (uri? (string->uri s))
                            (exit 42))
                        (regexp-exec p s)
                        (loop))))))
  (unfold (cute >= <> (current-processor-count))
          (lambda (i)
            (call-with-new-thread do-regexps))
          1+
          0)
  (do-regexps))
--8<---------------cut here---------------end--------------->8---

Ludo’.




This bug report was last modified 11 years and 97 days ago.

Previous Next


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