Skip to content

Conversation

@NWilson
Copy link
Member

@NWilson NWilson commented Oct 3, 2025

It's totally legal to return NULL for malloc(0), but every other platform that we target returns a non-NULL pointer. We don't need to do an allocation anyway (nor do we need to copy the terminating NUL byte).

This PR fixes a CI build failure on the z/OS runner.

It's totally legal to return NULL for malloc(0), but every other
platform that we target returns a non-NULL pointer. We don't need
to do an allocation anyway (nor do we need to copy the terminating
NUL byte).
@NWilson
Copy link
Member Author

NWilson commented Oct 3, 2025

I did do a quick check of every other call to malloc/calloc/realloc in our codebase. Every single other one appears to allocate a size which is definitely >0.

@NWilson NWilson merged commit c210f7c into master Oct 4, 2025
35 checks passed
@NWilson NWilson deleted the user/niwilson/zos-testing branch October 4, 2025 21:25
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.

3 participants