[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-janitors] [Chicken-bugs] #365: segfault caused by unit regex
From: |
Chicken Scheme |
Subject: |
[Chicken-janitors] [Chicken-bugs] #365: segfault caused by unit regex |
Date: |
Sat, 24 Nov 2007 03:31:55 -0000 |
#365: segfault caused by unit regex
-----------------------------------------------+----------------------------
Reporter: Jon Strait <address@hidden> | Type: defect
Status: new | Priority: major
Component: core libraries | Version: 2.7
Keywords: |
-----------------------------------------------+----------------------------
The following code nearly immediately causes a segfault if the included
text file is read in:
{{{
(use regex utils)
(define infile (read-all "spcre.txt"))
(define mat (string-match-positions
(regexp "(?m)^(\\S(\\S|\\s)+\\S)\\s+$")
infile))
}}}
The text file read in is just long enough (88 lines) to cause a segfault.
Three or 4 lines less in the text file input and the code runs to
completion. This regex pattern ended up too greedy for my intention
(matching the entire text on shorter text passages) and my adjustments to
make it non-greedy worked fine. (no crash on a much larger file) So it may
be an impractical pattern as it reads here.
Tested with Chicken 2.727
--
Ticket URL: <http://trac.callcc.org/ticket/365>
Chicken Scheme <http://www.call-with-current-continuation.org/>
The CHICKEN Scheme-to-C compiler
- [Chicken-janitors] [Chicken-bugs] #365: segfault caused by unit regex,
Chicken Scheme <=