Menu

#280 Patch for bug 1481958

closed-fixed
general (37)
5
2011-09-14
2011-08-19
No

Seems I can not attach files to the bug tracker, so I am adding it here. The attached patch was originally authored by Chris Butler to solve the Debian bug at http://bugs.debian.org/579450
I added a unit test to cover the change and checked that the test suite for perl5 still passes on i386 and amd64.
I will include this patch in the next Debian upload and hope that it can be merged upstream as well.

Discussion

  • Torsten Landschoff

     
  • Torsten Landschoff

    Is there anything I can do to support acceptance of this patch?

     
  • szager

    szager - 2011-09-07

    I'm not sure whether there's an active perl maintainer for SWIG right now; that may explain the delay. I'll reiterate my previous comment here:

    - Should remove the redundant 'v >= 0' check when v is of type UV.

    For what it's worth, I would approve the patch.

    Stefan

     
  • Robert Stone

    Robert Stone - 2011-09-10

    There are definitely problems in this area of the code (even in a 32 bit build), however the proposed patch does not address all of them. I am working on expanding the li_typemaps testcase to capture all the issues, and should have a comprehensive fix ready soon.

     
  • William Fulton

    William Fulton - 2011-09-13

    talby, does your commit fixing 1481958 also fix this one / replace this patch? Or torsten can you confirm 1481958 makes this patch redundant?

     
  • Robert Stone

    Robert Stone - 2011-09-14
    • assigned_to: nobody --> talby
    • status: open --> closed-fixed
     
  • Robert Stone

    Robert Stone - 2011-09-14

    Yes, in my test environment, the fix for 1481958 also caused the testcase in this patch to succeed. I used this patch as a starting point, but found a family of related problems. I did not include the new testcase, but rolled it's functionality into the li_typemaps_runtime.pl test.

     
  • Torsten Landschoff

    The patch by talby looks like it fixes some other problems as well. I did not really try to understand all the changes in there though.
    What I am wondering is if those checks via SvUOK are really needed as I would the relevant cases to be catched by SvIOK already?!

     
  • Robert Stone

    Robert Stone - 2011-09-26

    I found that SvIOK() can return true for SVs that are UVs larger than IV_MAX, so the SvUOK() tests had to come earlier. Surprisingly, "if (SvIOK(x)) { IV v = SvIV(x); ... }" can overflow.

     

Log in to post a comment.