You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix: Memory leakage in QkCountOps creation. (Qiskit#14930)
* Fix: Memory leakage in `QkCountOps` creation.
The following commits attempt to fix some memoery issues that the struct `QkOpCounts`. The `qk_opcounts_free` method would segfault if an empty object was passed. The function now checks whether the passed option includes a null pointer or an empty instance. The commits also change how the `data` attribute is generated without using `std::mem::forget`, but instead collection the `OpCount` vec into a boxed_slice and consuming it into a `Box`. Inspired by what was done for Qiskit#14884.
* Docs: Add release note.
* Fix: Ironic memory leakage
* Fix c opcounts free suggestion (#7)
* Rename to _clear, free name
* rm dangling file
* use pointers
* ... forgot to register test
* fix `size_t`
* Fix: Missed some renaming
* add note on clearing opscount
* be explicit about loading Box<[OpCount]>
* fix merge artifact
* Apply suggestions from code review
Co-authored-by: Eli Arbel <[email protected]>
* goto
* happy miri happy life
* Fix merge artifacts
---------
Co-authored-by: Julien Gacon <[email protected]>
Co-authored-by: Julien Gacon <[email protected]>
Co-authored-by: Eli Arbel <[email protected]>
0 commit comments