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

vagrant: use LDFLAGS="-Wl,--no-as-needed" in sanitizer runs #255

Merged
merged 5 commits into from
May 15, 2020

Conversation

mrc0mmand
Copy link
Member

@mrc0mmand mrc0mmand commented May 15, 2020

Since version 10, both gcc and clang started to ignore certain linker errors
when compiling with -fsanitize=address. This eventually leads up to -lcrypt
not being correctly propagated, but the fact is masked by the aforementioned
issue. However, when the binary attempts to load a symbol from the libcrypt
binary, it crashes since it's not linked correctly against it.
Negating the -Wl,--as-needed used by default by -Wl,--no-as-needed seems to
help in this case.

See:
https://bugzilla.redhat.com/show_bug.cgi?id=1827338#c3
#247

/cc @evverx - this whole situation feels especially icky, hopefully I'm not missing something obvious :-)

Since version 10, both gcc and clang started to ignore certain linker errors
when compiling with -fsanitize=address. This eventually leads up to -lcrypt
not being correctly propagated, but the fact is masked by the aforementioned
issue. However, when the binary attempts to load a symbol from the libcrypt
binary, it crashes since it's not linked correctly against it.
Negating the -Wl,--as-needed used by default by -Wl,--no-as-needed seems to
help in this case.

See:
  https://bugzilla.redhat.com/show_bug.cgi?id=1827338#c3
  systemd#247
@evverx
Copy link
Member

evverx commented May 15, 2020

As long as it works I think it should be good to go.

@mrc0mmand mrc0mmand merged commit 4b8715f into systemd:master May 15, 2020
@mrc0mmand mrc0mmand deleted the workaround-issue-247 branch May 15, 2020 20:59
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.

2 participants