-
Notifications
You must be signed in to change notification settings - Fork 69
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
jemalloc-sys: hardening strerror_r function detection #117
base: main
Are you sure you want to change the base?
Conversation
This reverts commit fa4486d. Signed-off-by: Jay Lee <BusyJayLee@gmail.com>
..and remove stale arch condition. Signed-off-by: Jay Lee <BusyJayLee@gmail.com>
It does not. I pulled the branch and run it on a flake.
So basically specify |
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.
WIth those suggestions, we disable warnings but don't pass unnecessary stuff in to the compiler during the phases.
According to your previous analysis in #116, the failure is caused by The reason why I keep pass cflags is because cc already does tweak for various platforms to works with Rust, not passing it down may cause unexpected behavior. |
d6dce83
to
63fae55
Compare
The failure is not caused by passing When you pass default compiler flags to In addition to the
Current revision also doesn't work on nix. |
Btw. I'm not sure whether |
You can make one lib work with an incorrect configuration, but how do you make all libs with that? Don't people using Nix do any development? During development, it's quite common to use 0 optimization in debug build, how do you get around such warnings? |
I totally agree, that |
I did another investigation. x.c#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int d() {
char* a = NULL;
return a;
}
int main() {
return d();
} gcc14
gcc13
|
Given all of that, I think it's fair to say that if someone was using this library via compiler with |
Yes, this is issue jemallocator or jemalloc should take care of. An error should be reported instead of making wrong assumptions. |
6645b64
to
f1a981f
Compare
Now with latest change, it should report failure during dev build on Nix with _FORTIFY_SOURCE being set. |
gcc14 with _FORTIFTY_SOURCE=3 on nix
gcc13 with _FORTIFY_SOURCE=3 on nix
and the compilation succeeded. So with those changes it still doesn't fail the build on |
Signed-off-by: Jay Lee <BusyJayLee@gmail.com>
f1a981f
to
9dfb01b
Compare
A few lines were missing from the final configure file. And the detection description is updated to be readable. |
Can confirm, it gives an error with gcc13 now.
|
This PR also removes stale arch conditions.
/cc @th7nder can you verify it still works on Nix?