Bug 14398 - grep with improper regular expression cause crash
Summary: grep with improper regular expression cause crash
Alias: None
Product: R
Classification: Unclassified
Component: Low-level (show other bugs)
Version: R 2.12.0
Hardware: ix86 (32-bit) Windows 32-bit
: P5 minor
Assignee: R-core
Depends on:
Reported: 2010-10-05 07:26 UTC by Marek Szatkowski
Modified: 2010-10-14 14:08 UTC (History)
0 users

See Also:

Screenshot of error message (13.58 KB, image/png)
2010-10-05 07:26 UTC, Marek Szatkowski

Note You need to log in before you can comment on or make changes to this bug.
Description Marek Szatkowski 2010-10-05 07:26:18 UTC
Created attachment 1131 [details]
Screenshot of error message

Following code

grep("a{2-3}", "aaa") # instead of "a{2,3}"

cause crash with message "Microsoft Visual C++ Runtime Library: assertion failed" (screenshot attached).

It happens also on Windows7 but not on Vista (tested with 2.11.1).

sessionInfo() # fresh installation.
R version 2.12.0 beta (2010-10-03 r53154)
Platform: i386-pc-mingw32/i386 (32-bit)

[1] LC_COLLATE=Polish_Poland.1250  LC_CTYPE=Polish_Poland.1250   
[3] LC_MONETARY=Polish_Poland.1250 LC_NUMERIC=C                  
[5] LC_TIME=Polish_Poland.1250    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base
Comment 1 Brian Ripley 2010-10-05 08:05:32 UTC
Yes, we are aware of some problems in that area of the TRE library.
However, it is not really an R problem, so a volunteer is needed to supply
a patch.
Comment 2 Brian Ripley 2010-10-14 14:08:07 UTC
TRE called assert instead of an error code here.
Changed for 2.12.0 patched