SourceForge has been redesigned. Learn more.
Close

#1218 Bad rename regexp causes segfault

closed-fixed
5
2012-01-27
2012-01-15
Anonymous
No

Hello,

I've just mistakenly entered a rename statement into interface file:

%rename("%(regex:/idis_(.*)/\\4/)s") "";

Which is of course bad, since \\4 is not there. I would imagine, that swig would generate error, warning or would just ignore it. Instead, swig compiler, run as:

swig -w314,451,462 -python python.i

Segfaulted.

Running swig-2.0.4 on gentoo here.

Discussion

  • William Fulton

    William Fulton - 2012-01-27

    Fixed for swig-2.0.5. Now you get a message like:

    SWIG:1: Error: PCRE capture replacement failed while matching "idis_(.*)" using "idis_abc_def_ghi_jkl" - request for group 4 is greater than the number of captures 1.

     
  • William Fulton

    William Fulton - 2012-01-27
    • assigned_to: nobody --> wsfulton
    • labels: --> code generation (general)
    • status: open --> closed-fixed
     

Log in to post a comment.