[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: regexp-exec critcial section errors

From: Han-Wen Nienhuys
Subject: Re: regexp-exec critcial section errors
Date: Thu, 18 Jan 2007 14:58:04 +0100
User-agent: Thunderbird (X11/20061219)

Kevin Ryde escreveu:
> In regexp-exec in 1.8, a nul in the input string, or a bad flags arg,
> results in a throw from a critical section, which calls abort().  Eg.
>       (regexp-exec (make-regexp "x") "\0")
>       => abort
>       (regexp-exec (make-regexp "x") "hello" 0 'badflags)
>       => abort
> What's the reason for the critical section?  Do we think regexec() is
> not reentrant?  It looks like a conversion from SCM_DEFER_INTS in past
> versions, if that suggests anything about it.
> I struck this when running a regexp search on some file data that
> slightly unexpectedly had nuls in it.  I think I was using 1.6 last
> time I did the same thing.  I guess that version silently ignores past
> the nul.  Maybe that should get a check, though there's probably a
> zillion libc calls that would really ought to have the same.


I get

Running reader.test
Running receive.test
Running regexp.test
ERROR: Unbound variable: exception:string-contains-nul
FAIL: check-guile

it might be a good idea to have an autobuild daemon that compiles and 
checks the test-suite.

 Han-Wen Nienhuys - address@hidden -

reply via email to

[Prev in Thread] Current Thread [Next in Thread]