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

Fix test_dylink_spaghetti #14921

Merged
merged 1 commit into from
Aug 20, 2021
Merged

Fix test_dylink_spaghetti #14921

merged 1 commit into from
Aug 20, 2021

Conversation

sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Aug 20, 2021

This test was inadvertently relying on an bug in llvm which was recently
fixed: #13773

In this test the class Class is defined in both the main and the side
module. If you run this code as is on the desktop the version of
Class defined in main.cpp will always win the side init will never
get printed.

The fix is to give the class in the side module a different name (and
alternative would be to put it in an anonymous namespace).

This change should allow the llvm fix to roll in:
https://reviews.llvm.org/D108413

This test was inadvertently relying on an bug in llvm which was recently
fixed: #13773

In this test the class `Class` is defined in both the main and the side
module.  If you run this code as is on the desktop the version of
`Class` defined in `main.cpp` will always win the `side init` will never
get printed.

The fix is to give the class in the side module a different name (and
alternative would be to put it in an anonymous namespace).

This change should allow the llvm fix to roll in:
https://reviews.llvm.org/D108413
@sbc100 sbc100 requested a review from dschuff August 20, 2021 18:34
@sbc100 sbc100 enabled auto-merge (squash) August 20, 2021 18:44
@sbc100 sbc100 merged commit 110b4e9 into main Aug 20, 2021
@sbc100 sbc100 deleted the fix_test_dylink_spaghetti branch August 20, 2021 19:25
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.

dynamic linking: Weakly defined functions are not handled correctly
2 participants