Re: multidefine segfault

2017-04-11 Thread Laurent Bercot
Out of curiousity, what kind of bug was it in terms of what was happening to the memory? Out of bounds access. The -r option code does "array[i-1]", and i may be zero when the key block is empty, which should never happen but was not properly checked. So your use case triggered

Re: multidefine segfault

2017-04-11 Thread fff iii
Thanks Laurent! Out of curiousity, what kind of bug was it in terms of what was happening to the memory? Also, in the above example, I would like to feed a three word input (string or line in regular terminology?) to the first multidefine, and extract the two of the words out of $msg with the

Re: multidefine segfault

2017-04-11 Thread Laurent Bercot
It's the second multidefine segfaulting. It does not seem to happen without '-r'. Thanks for the report! Should be fixed in the latest git, please try. You should get an error message saying "empty block" instead of a segfault. Your script is a misuse of multidefine ("$msg" expands to two

Re: multidefine segfault

2017-04-10 Thread fff iii
'multidefine' segfaults on a recent OpenBSD snapshot: The execline script like : #!/usr/local/bin/execlineb -W withstdinas line importas -u line line multidefine -r $line { cmd msg } multidefine -r $msg { key val } $ echo ' test ' | ./testmult Segmentation fault (core dumped) It's the