[Python-Dev] (s)re crashing in regrtest (was SRE 0.9.8 benchmarks) (original) (raw)

Mark Favas m.favas@per.dem.csiro.au
Thu, 03 Aug 2000 18:54:05 +0800


[Guido]

Hmm... here's an old problem that's returned (recursion on repeated group matches, I expect):

>>> p=re.compile('(x)*') >>> p <SREPattern object at 0x8127048> >>> p.match(500000*'x') Segmentation fault (core dumped) Ouch. Andrew, would you mind adding a test case for that to the re test suite? It's important that this doesn't come back!

In fact, on my machine with the default stacksize of 2048kb, test_re.py already exercises this bug. (Goes away if I do an "unlimit", of course.) So testing for this deterministically is always going to be dependent on the platform. How large do you want to go (reasonably)? - although I guess core dumps should be avoided...

Mark

-- Email - m.favas@per.dem.csiro.au Mark C Favas Phone - +61 8 9333 6268, 0418 926 074 CSIRO Exploration & Mining Fax - +61 8 9383 9891 Private Bag No 5, Wembley WGS84 - 31.95 S, 115.80 E Western Australia 6913