Skip to content

Abort on allocation failure in static literals - #4197

Merged
kddnewton merged 1 commit into
mainfrom
sec-static-literals-oom
Aug 4, 2026
Merged

kddnewton merged 1 commit into
mainfrom
sec-static-literals-oom

Conversation

@kddnewton

Copy link
Copy Markdown
Collaborator

No description provided.

@kddnewton
kddnewton merged commit b25cba9 into main Aug 4, 2026
108 of 110 checks passed
@kddnewton
kddnewton deleted the sec-static-literals-oom branch August 4, 2026 15:29
@Earlopain

Copy link
Copy Markdown
Collaborator

Any particular reason to only do this here? There are a few other places that just skip work or return NULL and will spectacularly fail if that actually happens.

@kddnewton

Copy link
Copy Markdown
Collaborator Author

There was a reason, and I'm forgetting it now. I think there way technically a leak if some weird circumstance happened.

I'm conflicted on this tbh. On the one hand now that xmalloc is hooked up for most of our consumers, we don't really have to worry about it (cruby, mruby, etc.). Those will do GC on allocation failure, and otherwise abort themselves.

On the otherhand, it would be nice to have a full project story for allocation failures that flows through the whole callstack. Because right now if you use prism and you don't use the xallocator interface, there's no way to handle running out of memory.

So I'm not sure, is the answer.

@Earlopain

Copy link
Copy Markdown
Collaborator

Oh well. And yeah, for ruby itself it's not a problem anymore.

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