filterPS fails if >255 chs. after match
I applied the fix for bug 563651 to revision 1.11
(the one in 5.02.3) of PackedString.lhs. With this,
the following program:
import System ( getArgs )
import PackedString ( filterPS, packString )
main = System.getArgs >>= realMain
realMain [oldOrNew,c:[]] = print $ filterPS (c ==)
(packString str)
where str = case oldOrNew of
"old" -> ys ++ abcs
"new" -> abcs ++ ys
where (abcs, ys) = ("abcdef",replicate 252 'y')
will segmentation fault when given arguments
["new","a"], ["new","b"], or ["new","c"]. Things
work as expect with any other character argument x in
["new",x]. PackedString.lhs without the fix for bug
563651 works fine in these cases (but fails with
["old","d"], etc.)
This is 5.02.3 with the fix for bug 563651 applied to
PackedString.lhs on Debian x86.
thanks,
mike
Trac metadata
Trac field |
Value |
Version |
5.02 |
Type |
Bug |
TypeOfFailure |
OtherFailure |
Priority |
normal |
Resolution |
ResolvedFixed |
Component |
hslibs/lang |
Test case |
|
Differential revisions |
|
BlockedBy |
|
Related |
|
Blocking |
|
CC |
|
Operating system |
|
Architecture |
|