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

Assertion in fcgiapp.c:82 will fail in most cases #1

Open
avistel opened this issue Oct 14, 2016 · 1 comment
Open

Assertion in fcgiapp.c:82 will fail in most cases #1

avistel opened this issue Oct 14, 2016 · 1 comment

Comments

@avistel
Copy link

avistel commented Oct 14, 2016

ASSERT(size == 0 || result != NULL);

Won't this assertion fail when you try to allocate anything more than 0 bytes? Shouldn't it be ASSERT(size != 0 || result != NULL)?

If this is intentional, can you explain why?

@avistel avistel closed this as completed Oct 14, 2016
@avistel
Copy link
Author

avistel commented Oct 14, 2016

Having looked at it again, as long as malloc returns a valid pointer, the assertion passes. I guess the only way this assertion would not work properly is if given size == 0, malloc returns a non-zero pointer. Not sure if that's something worth worrying about... is it?

@avistel avistel reopened this Oct 14, 2016
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

No branches or pull requests

1 participant