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

[bug] Missing return value and missing va_end() #2625

Closed
chongzhizhao opened this issue Oct 15, 2021 · 9 comments · Fixed by #2627
Closed

[bug] Missing return value and missing va_end() #2625

chongzhizhao opened this issue Oct 15, 2021 · 9 comments · Fixed by #2627
Assignees
Labels
Projects
Milestone

Comments

@chongzhizhao
Copy link

Bug Report

Description

Hi, I was testing cppcheck, a static analysis tool, on dogecoin and found these 2 issues. This is my first time attempting to report bugs, so let me know if they are valid.

  1. dogecoin/src/dogecoin-fees.cpp:25: Function with non-void return type has missing return statement.
  2. dogecoin/src/zmq/zmqpublishnotifier.cpp:33: va_list "args" not closed by va_end().

Dogecoin Commit ID

4c93783

@chromatic
Copy link
Member

Thanks for the report! I'll take a look this weekend unless someone does it before I do.

@patricklodder patricklodder added this to To do in 1.14.5 via automation Oct 15, 2021
@patricklodder patricklodder added this to the 1.14.5 milestone Oct 15, 2021
@patricklodder
Copy link
Member

Did some looking in advance

  1. dogecoin/src/dogecoin-fees.cpp:25

This is now line 69 and has already been fixed by @chromatic in aeccc23 on 1.14.5-dev

  1. dogecoin/src/zmq/zmqpublishnotifier.cpp:33

I think this is still open, I'll wait for the weekend ❤️

@Scerini
Copy link

Scerini commented Oct 16, 2021

Nice

@chromatic
Copy link
Member

Good catch. Bitcoin fixed this in 5ba61f, so pulling in that commit fixes it here (PR #2627).

@patricklodder patricklodder linked a pull request Oct 17, 2021 that will close this issue
@patricklodder
Copy link
Member

This has been solved for 1.14.5-dev, thank you @chromatic!

cppcheck is interesting by the way, it finds a lot more issues than static analysis from codeql (but it doesn't have the same analysis scope so it's not a replacement). Maybe we should add it to the GH actions run? Thoughts?

@chromatic
Copy link
Member

cppcheck caught a couple of things we didn't catch otherwise, so there's value in it. My only concerns are minor: adding additional latency to the GH actions run and maintenance costs of keeping the action running. Neither has been a drag on my work.

@patricklodder
Copy link
Member

My only concerns are minor: adding additional latency to the GH actions run and maintenance costs of keeping the action running.

I am not worried about the first because CodeQL already checks dependency code, so we can simply do a native ./configure with system libs and we should be good, because this should then be running faster than CodeQL (i.e. end to end it doesn't have negative impact then)

The second, yes this is a challenge. Though it should be obvious when it is broken, our biggest problems in the past have been that distros change and then the entire CI process breaks. If no one cares, it will stay broken and either become a blocker for PRs, or PRs get merged without testing. I have honestly only seen the latter, so that would be the same result as not doing it? 🤔

@chromatic
Copy link
Member

I agree. We always have the option to disable permanently or until it's fixed in the cases where it blocks PRs or its value no longer exceeds its costs.

I just don't want to add something without discussing pros and cons like this. I'm satisfied we have so far.

@patricklodder
Copy link
Member

Opened #2631 to explore this further for 1.14.6, so this issue can be closed.

1.14.5 automation moved this from To do to Done Oct 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

4 participants