#15 The python module crashes if the ambiguity function throws

closed-fixed
nobody
None
5
2011-07-10
2011-03-16
No

With an ambiguous grammar, if the ambiguity function throws (as the default one does), then the program crashes. This is due to the Py_DECREF(result); on line 226 of pydparser.c: in case of exception, result is null. This can be fixed by changing line 209 to:

if((result == NULL) || (result == Py_None)) {

or maybe by adding an extra test between lines 225 and 226:
if (result == NULL) {
Py_DECREF(list);
Py_DECREF(arglist);
return v[0];
}

Discussion

  • John Plevyak
    John Plevyak
    2011-07-10

    I believe this is fixed as part of Jonas H. 's patch.

     
  • John Plevyak
    John Plevyak
    2011-07-10

    • status: open --> open-fixed
     
  • John Plevyak
    John Plevyak
    2011-07-10

    • status: open-fixed --> closed-fixed