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

[coverity] Suppress false positive. SX#GULBI-122 #138

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

martyone
Copy link
Contributor

No description provided.

@martyone martyone requested a review from monich November 15, 2024 10:17
@monich
Copy link
Collaborator

monich commented Nov 15, 2024

Just out of curiosity, what coverity complained about?

@martyone
Copy link
Contributor Author

image

@monich
Copy link
Collaborator

monich commented Nov 18, 2024

I really don't get it - disconnected is checked as a loop condition and decremented at the bottom of the loop, how can it possibly overflow. And what is this disconnected = disconnected, its value is now whatever. That doesn't make any sense, does it?

@monich
Copy link
Collaborator

monich commented Nov 19, 2024

On the other hand, this disconnected count isn't really necessary (afaict it's just a micro-optimization for early termination of the loop) and can be removed without much of an impact. It would also make sense to remove the GBinderServiceManagerWatch entry when its last handler is gone. Let me try to rewrite this function in a way that makes coverity happier.

@martyone
Copy link
Contributor Author

I really don't get it - disconnected is checked as a loop condition and decremented at the bottom of the loop, how can it possibly overflow. And what is this disconnected = disconnected, its value is now whatever. That doesn't make any sense, does it?

Yes, it's clearly a false positive. Bug in the tool.

@monich
Copy link
Collaborator

monich commented Nov 20, 2024

BTW, what is this SX#GULBI thing? Looks like some sort of a magic necessary for the build to get through the build automation. Is it required? Does the old JB# magic still work?

@mkosola
Copy link

mkosola commented Nov 21, 2024

BTW, what is this SX#GULBI thing? Looks like some sort of a magic necessary for the build to get through the build automation. Is it required? Does the old JB# magic still work?

@monich JB# is still used, SX# is just another similar bug reference code for different projects

@monich
Copy link
Collaborator

monich commented Nov 24, 2024

#141 is what I suggest instead

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