-
Notifications
You must be signed in to change notification settings - Fork 390
native_lib/trace: fix and reenable #4435
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
base: master
Are you sure you want to change the base?
Conversation
37fbac4
to
d2ed49d
Compare
The only options I see for making the builds work nicely regardless of arch are either (a) copy-pasting a massive |
0110f5a
to
6907e9d
Compare
It should be entirely possible to do this with a single |
src/shims/native_lib/mod.rs
Outdated
//#[cfg(target_os = "linux")] | ||
//pub mod trace; | ||
#[cfg(trace)] | ||
pub mod trace; |
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.
To reduce the amount of cfg
in this file, I would suggest something like this:
#[cfg_attr(not(all(target_os = "linux", any(target_arch = "x86_64", ...), path = "trace/stub.rs")]
mod trace;
and then the stub.rs
file contains just a bunch of empty functions and dummy type aliases so that to the outside, it looks like all the same functions and types exist.
src/alloc/mod.rs
Outdated
@@ -1,5 +1,5 @@ | |||
mod alloc_bytes; | |||
#[cfg(target_os = "linux")] |
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.
Let's just keep using that allocator on all Linux targets, no harm in that.
@rustbot author |
Reminder, once the PR becomes ready for a review, use |
3b1584e
to
93015d6
Compare
9e54dab
to
f2eb0e3
Compare
60837c7
to
f411f4f
Compare
ef187be
to
199bf13
Compare
a06efe1
to
f17c0ce
Compare
@rustbot ready |
Co-authored-by: Ralf Jung <post@ralfj.de>
Co-authored-by: Ralf Jung <post@ralfj.de>
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.
I have rebased and pushed a commit with some cleanups, please check if those make sense.
@@ -417,71 +412,13 @@ fn handle_segfault( | |||
if acc_ty.is_writable() { |
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.
Can it actually happen that the same operation is both a read and a write? Is that used for instance for atomic fetch-and-add and operations like that?
Per discussion in various PRs (#4401, #4405), this addresses (some of) the points raised. Also using this to check if CI passes on all architectures.