don't pass CFLAGS and fix _FORTIFY_SOURCE errors#116
Merged
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
BusyJay
reviewed
Jan 31, 2025
Signed-off-by: Konrad Stepniak <[email protected]>
Signed-off-by: Konrad Stepniak <[email protected]>
Member
|
Thank you! |
BusyJay
added a commit
that referenced
this pull request
Feb 6, 2025
This reverts commit fa4486d. Signed-off-by: Jay Lee <[email protected]>
Member
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 |
BusyJay
added a commit
that referenced
this pull request
May 3, 2025
* 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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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