icnhoukdsiih / testlib

Automatically exported from code.google.com/p/testlib
0 stars 0 forks source link

Bug in patterns #21

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Run http://pastebin.com/Yv0fiXww on input 
a
cause bad_alloc exception.
Also if change 127 to 128 code fails with Illigal pattern exception.

VERSION "0.7.1"
Windows XP
Gcc version 4.5.1(tdm-1)

Original issue reported on code.google.com by Kunyavs...@gmail.com on 29 Dec 2011 at 2:33

GoogleCodeExporter commented 8 years ago
Using last version and compiling with -O0 makes no difference.

Original comment by Kunyavs...@gmail.com on 29 Dec 2011 at 2:41

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
It can be improved by

-for (char c = prev; c <= next; c++)
+for (char c = prev; c != next; c++)
   result.push_back(c);
+result.push_back(next)

in __pattern_scanCharSet

Original comment by Kunyavs...@gmail.com on 29 Dec 2011 at 3:26

GoogleCodeExporter commented 8 years ago
Fixed in 0.7.3

Original comment by mirzayan...@gmail.com on 29 Dec 2011 at 4:20