maliput / maliput/maliput_py

Verify return value policy for bindings

Open
#49 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
0
Forks
0
Avg merge
2d 13h
Merged PRs (30d)
2

Description

Return value policy
![image](https://user-images.githubusercontent.com/53065142/150792119-9bfccc8d-7bcf-4c04-822d-e6ad942eec45.png)

_Note: For further information check all the policies [here](https://pybind11.readthedocs.io/en/stable/advanced/functions.html#return-value-policies)_

In most of the cases that we are returning a pointer or a reference we are using `py::return_value_policy::reference_internal` however there are some cases where `py::return_value_policy::reference` is being used.
This should be verified to avoid undefined behavior.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating every binding that uses py::return_value_policy::reference or reference_internal, then compare each case with the pybind11 return-value-policy documentation linked in the issue. Done means every pointer or reference return has a verified policy and any unsafe use is identified for correction.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.