-
Notifications
You must be signed in to change notification settings - Fork 278
Remove multiple function assertion #5402
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
Remove multiple function assertion #5402
Conversation
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.
As I understand emplace, the log will only be triggered if you have two things that mangle to the same name and are identical, right? If so and we have a valid use-case where this can happen (and it seems that #5398 has one) then this should be fine.
@martin-cs that's all correct. Thank you! |
This commit removes an assertion that triggers when multiple functions get mangled to the same name when using the --export-file-local-symbols flag to goto-cc. This assertion was previously valid when compiling files one at a time, but commit fcd1083 introduced the possibility of compiling and linking several files at once. This is a problem when two source files both include an implementation file, like [1], because the implementation may contain static functions that get mangled twice. This commit replaces the assertion with a debug message in case users would like to check how often this happens. This commit fixes diffblue#5380. [1] https://github.com/awslabs/aws-c-common/blob/master/include/aws/common/atomics_gnu.inl
06b02b4
to
599fd66
Compare
Codecov Report
@@ Coverage Diff @@
## develop #5402 +/- ##
===========================================
- Coverage 68.19% 68.19% -0.01%
===========================================
Files 1176 1176
Lines 97517 97519 +2
===========================================
Hits 66502 66502
- Misses 31015 31017 +2
Continue to review full report at Codecov.
|
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.
Add a test?
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.
LGTM
@karkhaz I think that's alright. I'd rather keep the test from the previous PR however, but now I can remove the backing out of the commit. |
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.
ok
Hang on, surely in that case that test should change from broken to working or similar? Can we add a test that would previously trip the invariant? |
@smowton The test is working because the #5398 is removing the commit that caused the issue in the first place. Assuming this goes in, the test should be passing. If the test gets merged first, without first backing out the previous commit or just removing the assertion like in here, then it should fail. But the test is associated, it's just the merging sequence that should matter as to whether it passes or fails. |
I am going ahead and merging this one. For any issues with this, ping me. |
This is guarding for the regression described in github issue diffblue#5380 and fixed in github PR diffblue#5402.
This commit removes an assertion that triggers when multiple functions
get mangled to the same name when using the --export-file-local-symbols
flag to goto-cc.
This assertion was previously valid when compiling files one at a time, but
commit fcd1083 introduced the possibility of compiling and linking several
files at once. This is a problem when two source files both include an
implementation file, like [1], because the implementation may contain static
functions that get mangled twice.
This commit replaces the assertion with a debug message in case users would
like to check how often this happens.
This commit fixes #5380.
[1] https://github.com/awslabs/aws-c-common/blob/master/include/aws/common/atomics_gnu.inl