Skip to content

Null checks for allocations in MKL backend to prevent crashes under memory pressure#780

Open
jberg5 wants to merge 2 commits into
osqp:masterfrom
jberg5:malloc-null-checks
Open

Null checks for allocations in MKL backend to prevent crashes under memory pressure#780
jberg5 wants to merge 2 commits into
osqp:masterfrom
jberg5:malloc-null-checks

Conversation

@jberg5
Copy link
Copy Markdown

@jberg5 jberg5 commented Mar 3, 2026

#779

I've observed segfaults when running (python) OSQP in a memory constrained production environment. It appears that when the system is under memory pressure, and allocations fail, there are a few areas in the code where the failures go unchecked and cause serious issues.

This PR attempts to address them. To contain the scope, I've only tried to fix the MKL backend here. If this approach seems reasonable I can try to fix the builtin backend as well.

Claude (with Opus 4.6) wrote most of this under my direction.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 3, 2026

CLA assistant check
All committers have signed the CLA.

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