-
Couldn't load subscription status.
- Fork 91
don't pass CFLAGS and fix _FORTIFY_SOURCE errors #116
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
don't pass CFLAGS and fix _FORTIFY_SOURCE errors #116
Conversation
|
Welcome @th7nder! It looks like this is your first PR to tikv/jemallocator 🎉 |
52accb4 to
b8885e4
Compare
Signed-off-by: Konrad Stepniak <[email protected]>
b8885e4 to
7abada8
Compare
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.
Rest LGTM
Signed-off-by: Konrad Stepniak <[email protected]>
Signed-off-by: Konrad Stepniak <[email protected]>
|
Thank you! |
This reverts commit fa4486d. Signed-off-by: Jay Lee <[email protected]>
I think this means it's wrong to set _FORTIFY_SOURCE=3 by default. |
|
Thanks so much for the fix! Would really appreciate a release if possible 🙏 |
|
This is problematic for my use-case. I use |
* Revert "don't pass CFLAGS and fix _FORTIFY_SOURCE errors (#116)" This reverts commit fa4486d. * jemalloc-sys: hardening strerror_r function detection test on strerror_r can fail due to reasons other than strerror_r itself, so add an additional test to determine the failure is expected. Also remove stale arch condition. Close #108. Signed-off-by: Jay Lee <[email protected]>
Fixes NixOS/nixpkgs#370494 and #108.
Long-ass explanation is here: NixOS/nixpkgs#370494 (comment).
When running under nix environment
_FORTIFY_SOURCE=3is set by default.Currently the
CFLAGSare passed down to the underlyingjemalloc compiler.If we're running
cargo build, it means that something along the lines:-O0 -ffunction-sections -fdata-sections -fPIC -m64 -Wallis passed down (optimisation disabled, because debug mode).Because optimisations are disabled, we're getting errors:
This simply removes passing down the CFLAGS, so they can be set automatically by underlying autoconfigures and not dependent on the build profile.
Plus jemalloc/jemalloc#1196 was solved long time ago, so I think the reason those were added is gone.
P.S this issue is reproducible by running the master branch,
flake.nixin the root repoand running