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

curl_multi_wait in debug build calls infof(NULL,..) ? #2627

Closed
dtzWill opened this issue May 31, 2018 · 1 comment
Closed

curl_multi_wait in debug build calls infof(NULL,..) ? #2627

dtzWill opened this issue May 31, 2018 · 1 comment

Comments

@dtzWill
Copy link
Contributor

dtzWill commented May 31, 2018

Well, I assume "debug build" is what DEBUGF macro is for.

Anyway, just spotted this while debugging my application....

Look at:

curl/lib/multi.c

Line 1086 in 6d8c628

DEBUGF(infof(data, "Curl_poll(%u ds, %d ms) == %d\n",

(current master, and I think at least 7.60)

It's not hard to trace control-flow paths to this line from execution of while(data) { ... ; data = data->next; } loops. I was considering the situation where curl has no fds (curlfds) and there's extrafds-- but at a glance I think this can be triggered even when no extra fd's are used.

I haven't tried building things to force the issue, apologies if this can't happen, but thought I'd share "just in case".

If someone's enabled debugging the last thing they need is extra crashing behavior that doesn't occur otherwise :P.

@bagder
Copy link
Member

bagder commented Jun 1, 2018

Nice catch, thanks! I think I can just remove that line as I don't think it helps us much with anything these days! Update: infof() actually checks for a NULL pointer so it will just not do anything in that case. I still think we can remove the output.

@bagder bagder closed this as completed in 923ce4a Jun 1, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Aug 30, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants