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

Fix unsafe_load of uninitialized workspace #126

Merged
merged 1 commit into from
Jun 13, 2024
Merged

Conversation

odow
Copy link
Contributor

@odow odow commented Jun 13, 2024

It's never safe to call unsafe_load when the pointer is not explicitly initialized

julia> import OSQP

julia> p = Ptr{OSQP.Workspace}(C_NULL)
Ptr{OSQP.Workspace} @0x0000000000000000

julia> unsafe_load(p)

[87795] signal (11.1): Segmentation fault: 11
in expression starting at REPL[3]:1
unsafe_load at ./pointer.jl:119 [inlined]
unsafe_load at ./pointer.jl:119
unknown function (ip: 0x10c832567)

@imciner2 imciner2 merged commit 8197027 into osqp:master Jun 13, 2024
17 checks passed
@odow odow deleted the patch-3 branch June 13, 2024 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants