-
Notifications
You must be signed in to change notification settings - Fork 494
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 5232: Fix GCC v12 build [-Wuse-after-free] #1136
Bug 5232: Fix GCC v12 build [-Wuse-after-free] #1136
Conversation
This patch should fix the gcc-12 build problem, but it is not still clear why it made gcc-12 happy. We need some more time to figure out what the underlying problem is and whether this solution is the correct one (or come up with another solution). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good and confirmed it fixes the build.
IMO commit this to fix the immediate build. RefCount has a number of issues identified long ago by static analysis, and this may just be a side effect of those that the newest GCC are more picky about. |
Since there is no emergency here (AFAICT), I support spending a bit more time on trying to figure out what is really going on, now that we have a much easier-to-reproduce case than the Coverity ones.
|
@eduard-bagdasaryan, thanks a lot for researching this problem! I have updated PR description to reflect your findings. Please adjust as needed. Once the PR description is agreed upon, we should merge this PR. |
This warning is a false positive. Introduced in GCC v12, use-after-free checks have attracted dozens of bug reports, with several reports still open as of GCC v12.2, including one that looks very similar to our case: https://gcc.gnu.org/bugzilla//show_bug.cgi?id=106776 Removing (excessive) "inline" works around this GCC bug. We do not have a better workaround right now. If we see more false positives like this, we may disable -Wuser-after-free until its support matures.
The PR description looks correct now. |
Thank you. I will give Amos a few days to review the updated PR description before clearing this PR for merging. @yadij , please feel free to clear at any time. |
This warning is a false positive. Introduced in GCC v12, use-after-free checks have attracted dozens of bug reports, with several reports still open as of GCC v12.2, including one that looks very similar to our case: https://gcc.gnu.org/bugzilla//show_bug.cgi?id=106776 Removing (excessive) "inline" works around this GCC bug. We do not have a better workaround right now. If we see more false positives like this, we may disable -Wuse-after-free until its support matures.
This warning is a false positive. Introduced in GCC v12, use-after-free checks have attracted dozens of bug reports, with several reports still open as of GCC v12.2, including one that looks very similar to our case: https://gcc.gnu.org/bugzilla//show_bug.cgi?id=106776 Removing (excessive) "inline" works around this GCC bug. We do not have a better workaround right now. If we see more false positives like this, we may disable -Wuse-after-free until its support matures.
This warning is a false positive. Introduced in GCC v12, use-after-free checks have attracted dozens of bug reports, with several reports still open as of GCC v12.2, including one that looks very similar to our case: https://gcc.gnu.org/bugzilla//show_bug.cgi?id=106776 Removing (excessive) "inline" works around this GCC bug. We do not have a better workaround right now. If we see more false positives like this, we may disable -Wuse-after-free until its support matures.
This warning is a false positive. Introduced in GCC v12, use-after-free
checks have attracted dozens of bug reports, with several reports still
open as of GCC v12.2, including one that looks very similar to our case:
https://gcc.gnu.org/bugzilla//show_bug.cgi?id=106776
Removing (excessive) "inline" works around this GCC bug. We do not have
a better workaround right now. If we see more false positives like this,
we may disable -Wuse-after-free until its support matures.