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@~]$ cat tmp

[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

The flag –preserve-positions has no other side-effects, except for calling asfix-anno-positions.

Submitted on 11 July 2007 at 10:05

On 8 October 2008 at 16:46 Jira commented:

STR-728, martin:
Will probably be fixed by switching to asfix-anno-location, STR-759. I will write a test for ambiguous nodes.


On 8 October 2008 at 18:28 Jira commented:

STR-728, martin:
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 …


On 8 October 2008 at 18:29 Jira commented:

STR-728, martin:
Use asfix-anno-location, see issue STR-759

Log in to post comments