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

Remove release() calls in pybind11 wrappers, if practical

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: To Do
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: 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.

      Pim Schellart [X] 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

            Hide
            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.

            Show
            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.
            Hide
            jbosch Jim Bosch added a comment -

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

            Show
            jbosch Jim Bosch added a comment - I'm fixing this in a side commit on DM-34721 . Will close when that closes.

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              rowen Russell Owen
              Watchers:
              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.