Skip to content

Instantly share code, notes, and snippets.

@devdanzin
Created March 18, 2026 10:07
Show Gist options
  • Select an option

  • Save devdanzin/14a5663604e1d7fb930d121b4e0c8d25 to your computer and use it in GitHub Desktop.

Select an option

Save devdanzin/14a5663604e1d7fb930d121b4e0c8d25 to your computer and use it in GitHub Desktop.
optimizer_symbols.c: make_bottom NULL deref when arena full

optimizer_symbols.c: make_bottom NULL deref when arena full

Summary

sym_new(ctx) at line 1535 can return NULL when the type arena is full. Result immediately dereferenced without check. Every other sym_new call site checks for NULL.

Fix

Add NULL check: if (sym == NULL) return out_of_space(ctx);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment