-
Notifications
You must be signed in to change notification settings - Fork 83
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
vidmix: coverity fix #830
vidmix: coverity fix #830
Conversation
New defect(s) Reported-by: Coverity Scan Showing 12 of 12 defect(s) ** CID 462177: Concurrent data access violations (MISSING_LOCK) /rem/vidmix/vidmix.c: 71 in clear_all() ________________________________________________________________________________________________________ *** CID 462177: Concurrent data access violations (MISSING_LOCK) /rem/vidmix/vidmix.c: 71 in clear_all() 65 struct le *le; 66 67 for (le=mix->srcl.head; le; le=le->next) { 68 69 struct vidmix_source *src = le->data; 70 >>> CID 462177: Concurrent data access violations (MISSING_LOCK) >>> Accessing "src->clear" without holding lock "vidmix_source.mutex". Elsewhere, "vidmix_source.clear" is accessed with "vidmix_source.mutex" held 5 out of 6 times. 71 src->clear = true; 72 } 73 } 74 75 76 static void destructor(void *arg) ** CID 462176: Concurrent data access violations (MISSING_LOCK) /rem/aubuf/ajb.c: 155 in ajb_alloc()
Looks like our coverity CI setup is broken, has no reports about this. |
there is only one warning from coverity on baresip/re:
|
It looks like this is from the |
I have used a manual build and upload:
|
Thanks, CI setup works now (is triggered currently only by tags or coverity branch, since coverity limits daily uploads) and shows all bugs. Now we can fix them :-) |
Looks like this new locking produces a potential deadlock:
Should we revert this commit? |
We can replace |
Or we drop the optional clear, I had problems with artifacts in the past and simply clear always the background: https://github.com/Studio-Link/mix/blob/main/patches/re_vidmix_clear.patch |
New defect(s) Reported-by: Coverity Scan
Showing 12 of 12 defect(s)
** CID 462177: Concurrent data access violations (MISSING_LOCK)
/rem/vidmix/vidmix.c: 71 in clear_all()
________________________________________________________________________________________________________ *** CID 462177: Concurrent data access violations (MISSING_LOCK) /rem/vidmix/vidmix.c: 71 in clear_all()
65 struct le *le;
66
67 for (le=mix->srcl.head; le; le=le->next) {
68
69 struct vidmix_source *src = le->data;
70
71 src->clear = true;
72 }
73 }
74
75
76 static void destructor(void *arg)
** CID 462176: Concurrent data access violations (MISSING_LOCK)
/rem/aubuf/ajb.c: 155 in ajb_alloc()