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

[libc] Add proper alloca to OpenWatcom C library #2123

Merged
merged 2 commits into from
Dec 6, 2024
Merged

[libc] Add proper alloca to OpenWatcom C library #2123

merged 2 commits into from
Dec 6, 2024

Conversation

ghaerr
Copy link
Owner

@ghaerr ghaerr commented Dec 5, 2024

Adds stack-overflow checking alloca to Open Watcom C library for ELKS. This allows alloca to be safely used in OWC projects without fear of stack overflow. Some tools in 8086-toolchain will be updated after this is committed.

This version of alloca will check for stack remaining for the allocation, and if there isn't enough, the message "ALLOCA FAIL, INCREASE STACK" will be displayed, and alloca will return NULL.

Also adds __STK routine for OWC when using its -fstack-check option. This routine will cause a stack overflow check to be performed on every function entry.

@ghaerr ghaerr merged commit ad641fe into master Dec 6, 2024
2 checks passed
@ghaerr ghaerr deleted the alloca branch December 6, 2024 00:55
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.

1 participant