Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The IPC pointer import mechanism is unsafe, inconsistent with rest of lib #479

Closed
eyalroz opened this issue Mar 25, 2023 · 0 comments
Closed

Comments

@eyalroz
Copy link
Owner

eyalroz commented Mar 25, 2023

In ipc.hpp, we support the import of pointers from IPC handles. Unfortunately:

  1. We expose an import() method which returns a non-RAII type, which the user needs to remember to release itself (via unmap()).
  2. The RAII/CADRe class we do provide is structured different than other wrappers, with a public ctor rather than wrap() and create() named ctor idioms
@eyalroz eyalroz added the task label Mar 25, 2023
@eyalroz eyalroz self-assigned this Mar 25, 2023
eyalroz added a commit that referenced this issue Mar 25, 2023
* Renamed: `memory::ipc::imported_t` ->  `memory::ipc::imported_ptr_t`
* `mempry::ipc::import()` now returns a `memory::ipc::imported_ptr_t`, now a raw `void*`
* `memory::ipc::imported_ptr_t` is now itself not templated, and only has a `get()` method which _may_ be invoked with a type
* `memory::ipc::imported_ptr_t` is no longer constructed directly - you need to either `import()` or `wrap()`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant