Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-15200

Remove release() calls in pybind11 wrappers, if practical

    XMLWordPrintable

Details

    • Improvement
    • Status: To Do
    • Resolution: Unresolved
    • None
    • sphgeom

    Description

      The sphgeom pybind11 wrappers have many instances of wrapped functions returning a unique pointer by releasing it just before returning it. Removing the call to .release() causes segfaults in all cases I tried except when it appears in the first function in a pickle wrapper (the one that appears on the Python side as __getstate__). I find this very surprising because the seemingly identical function encode() does segfault if .release() is removed.

      pschella asked me to file this ticket to figure out what's going on and remove the calls to .release() if possible.

      Attachments

        Issue Links

          Activity

            No builds found.
            rowen Russell Owen created issue -
            rowen Russell Owen made changes -
            Field Original Value New Value
            Risk Score 0
            pschella Pim Schellart [X] (Inactive) made changes -
            Assignee Pim Schellart [ pschella ]
            tjenness Tim Jenness made changes -
            Remote Link This issue links to "Page (Confluence)" [ 32636 ]
            ktl Kian-Tat Lim added a comment -

            Removing all the release() calls and the now-redundant lambdas seems to work properly, at least as far as sphgeom's unit tests are concerned.

            ktl Kian-Tat Lim added a comment - Removing all the release() calls and the now-redundant lambdas seems to work properly, at least as far as sphgeom's unit tests are concerned.
            jbosch Jim Bosch added a comment -

            I'm fixing this in a side commit on DM-34721. Will close when that closes.

            jbosch Jim Bosch added a comment - I'm fixing this in a side commit on DM-34721 . Will close when that closes.
            jbosch Jim Bosch made changes -
            Link This issue relates to DM-34721 [ DM-34721 ]

            People

              Unassigned Unassigned
              rowen Russell Owen
              Jim Bosch, Kian-Tat Lim, Russell Owen
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Jenkins

                  No builds found.