On Mon, 02 Jul 2007 16:46:54 -0700 Mark Glines (via RT) <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] ~/parrot $ ./parrot > "/home/paranoid/parrot/t/examples/shootout_16.pir" > <examples/shootout/regexdna.pir.input agggtaaa|tttaccct 0 > [cgt]gggtaaa|tttaccc[acg] 3 a[act]ggtaaa|tttacc[agt]t 9 > ag[act]gtaaa|tttac[agt]ct 8 > agg[act]taaa|ttta[agt]cct 10 > aggg[acg]aaa|ttt[cgt]ccct 3 > agggt[cgt]aa|tt[acg]accct 4 > agggta[cgt]a|t[acg]taccct 3 > agggtaa[cgt]|[acg]ttaccct 5 > Segmentation fault (core dumped)
...but that test script is pretty huge. Here's a simplified test case (attached). The segfault is in the implementation of an op (substr_s_i_i_s). It calls string_replace() to replace a substring with another, but calls it with a NULL "rep" pointer. String_replace is declared with /*NULLOK*/ for the "rep" pointer, but it then calls string_rep_compatible() (whose arguments are /*NN*/) without checking for nullness first. Sooo... I'm not sure if the "rep" argument is NULL for the same *reason* as the above script (a comment from Coke has made me paranoid that a DOD run may be to blame), but should this emit an error message, or fix it up by using '' instead, or punt to the 3-argument substr() instead, rather than segfaulting? Mark
test.pir
Description: Binary data