STR-728: asfix-anno-position-info(|path) segfaults on amb-nodes
When a amb-node is encountered in a parsed-tree the strategy asfix-anno-position-info segfaults.
For example, using a ambiguous version of parse-php:[eric@~]$ parse-php5 -i tmp | pp-aterm Document(  , FullOpenTag() , [ amb( [ Expr( FunctionCall(FunctionName("throw"), [Param(Variable(Simple("foo")))]) ) , Throw(Variable(Simple("foo"))) ] ) ] , CloseTag() , [Literal(" ")] ) [eric@~]$ parse-php5 -i tmp --preserve-positions | pp-aterm readFromTextFile: parse error at line 0, col 0 not a valid term pp-aterm: rewriting failed [eric@~]$ parse-php5 -i tmp --preserve-positions Segmentation fault
[eric@~]$ cat tmp
The flag –preserve-positions has no other side-effects, except for calling asfix-anno-positions.Submitted on 11 July 2007 at 10:05
Will probably be fixed by switching to asfix-anno-location, STR-759. I will write a test for ambiguous nodes.
Reproduced this issue, thanks for reporting. There is now a disabled test in stratego-sglr-tests for this issue.
I would suggest to switch to asfix-anno-location. We’ll keep this issue unresolved for the record (since the position-info will be around as well for some time, and will stay broken). I’ll close this as won’t fix. I’m sorry we cannot fix this issue in position-info itself …
Use asfix-anno-location, see issue STR-759
Log in to post comments