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

Add definitions in ucontext.h in Android for ARM, x86, and x86_64 #1622

Merged
merged 4 commits into from
Feb 29, 2020

Conversation

igrep
Copy link

@igrep igrep commented Dec 12, 2019

@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @gnzlbg (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@igrep igrep force-pushed the android-ucontext branch 3 times, most recently from e3c5916 to c6b0b73 Compare December 19, 2019 01:47
@igrep
Copy link
Author

igrep commented Dec 19, 2019

@gnzlbg This is a reminder. Now the left build error is just a network failure when building for nightly-x86_64-unknown-linux-gnu, which isn't modified by this pull request.
So there mustn't be any problems CI can detect.

Copy link
Contributor

@gnzlbg gnzlbg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks really good already, i've left some minor comments.

src/unix/linux_like/android/b32/arm.rs Outdated Show resolved Hide resolved
src/unix/linux_like/android/b32/arm.rs Outdated Show resolved Hide resolved
src/unix/linux_like/android/b32/arm.rs Outdated Show resolved Hide resolved
src/unix/linux_like/android/b32/arm.rs Outdated Show resolved Hide resolved
src/unix/linux_like/android/b32/arm.rs Outdated Show resolved Hide resolved
src/unix/linux_like/android/b64/mod.rs Outdated Show resolved Hide resolved
src/unix/linux_like/android/b64/x86_64/mod.rs Outdated Show resolved Hide resolved
src/unix/linux_like/android/b64/x86_64/mod.rs Outdated Show resolved Hide resolved
src/unix/linux_like/android/b64/x86_64/mod.rs Show resolved Hide resolved
src/unix/linux_like/android/b64/x86_64/mod.rs Outdated Show resolved Hide resolved
@igrep
Copy link
Author

igrep commented Dec 24, 2019

All of your comments don't sound minor to me... 😂
Anyway, I'll fix as many as possible.
Thanks.

@gnzlbg
Copy link
Contributor

gnzlbg commented Dec 24, 2019

Thank you for fixing all of these issues so quickly. I'll be a bit unavailable over christmas, but I'll try to take a look every now and then if you make progress with the types using an union.

Basically it' what you originally suggested: you need to create a named union, and then use it as a field. However, there is no union with that name in the C file, so you need to skip trying to generate tests for that in the libc-test/build.rs (e.g. by adding a match arm like: cfg.skip_struct(|name, is_struct, is_union| match name { ..., "your_union_name" if is_union => true, } ). This might not suffice, since then the struct has a field of the form field: your_union_name and there is no type your_union_name in C either, so we need to skip testing this struct field as well (there are examples in the libc-test/build.rs about how to do this).

I think it would be nice to have a way to test fields of anonymous unions by mapping them to some Rust union field in the ctest crate, but we don't have that functionality yet - so it's ok to skip these tests for now.

igrep pushed a commit to igrep/wasmer that referenced this pull request Dec 27, 2019
I'll send a PR after rust-lang/libc#1622 is merged and released
igrep pushed a commit to igrep/wasmer that referenced this pull request Dec 27, 2019
I'll send a PR after rust-lang/libc#1622 is merged and released
igrep pushed a commit to igrep/wasmer that referenced this pull request Dec 27, 2019
I'll send a PR after rust-lang/libc#1622 is merged and released
igrep pushed a commit to igrep/wasmer that referenced this pull request Jan 21, 2020
I'll send a PR after rust-lang/libc#1622 is merged and released
igrep pushed a commit to iijlab/wasmonandroid that referenced this pull request Jan 21, 2020
@igrep
Copy link
Author

igrep commented Jan 30, 2020

@gnzlbg ping.

igrep pushed a commit to igrep/wasmer that referenced this pull request Jan 31, 2020
I'll send a PR after rust-lang/libc#1622 is merged and released
@igrep
Copy link
Author

igrep commented Feb 19, 2020

@JohnTitor Can I ask you to review this instead of @gnzlbg?
This pull request has been stalled since I've fixed all problems pointed out...

@JohnTitor
Copy link
Member

r? @JohnTitor

@rust-highfive rust-highfive assigned JohnTitor and unassigned gnzlbg Feb 25, 2020
Copy link
Member

@JohnTitor JohnTitor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay! Overall looks good. Also could you squash commits into 5 or so? It's too large to merge just as it is.

src/unix/linux_like/android/b32/arm.rs Outdated Show resolved Hide resolved
Copy link
Member

@JohnTitor JohnTitor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@JohnTitor JohnTitor merged commit 70d4c56 into rust-lang:master Feb 29, 2020
igrep pushed a commit to igrep/wasmer that referenced this pull request Mar 2, 2020
I'll send a PR after rust-lang/libc#1622 is merged and released
@igrep igrep deleted the android-ucontext branch March 2, 2020 06:50
igrep pushed a commit to igrep/wasmer that referenced this pull request Mar 3, 2020
I'll send a PR after rust-lang/libc#1622 is merged and released
igrep pushed a commit to igrep/wasmer that referenced this pull request Mar 11, 2020
I'll send a PR after rust-lang/libc#1622 is merged and released
igrep pushed a commit to igrep/wasmer that referenced this pull request Mar 11, 2020
I'll send a PR after rust-lang/libc#1622 is merged and released
igrep pushed a commit to igrep/wasmer that referenced this pull request Mar 12, 2020
I'll send a PR after rust-lang/libc#1622 is merged and released
igrep pushed a commit to igrep/wasmer that referenced this pull request Mar 16, 2020
I'll send a PR after rust-lang/libc#1622 is merged and released
igrep pushed a commit to igrep/wasmer that referenced this pull request Mar 18, 2020
I'll send a PR after rust-lang/libc#1622 is merged and released
igrep pushed a commit to igrep/wasmer that referenced this pull request Mar 18, 2020
The new version of libc contains changes necessary to build
wasmer-runtime-core for Android.

See rust-lang/libc#1622 for details.
bors bot added a commit to wasmerio/wasmer that referenced this pull request Mar 18, 2020
1292: Experimental Support for Android (x86_64 and AArch64) r=syrusakbary a=igrep

# Description

Related: #1113

# Current Status

- ~~This pull request is a draft until the next version of libc crate (which should contain rust-lang/libc#1622
    - Now released! 🎉
- I confirmed the tests of wasmer-runtime-core pass on Android x86\_64.
    - The other tests including ones on AArch64 seems too hard so far... 😓 

# Review

- [x] Add a short description of the the change to the CHANGELOG.md file

# Note

I'm happy given any hint to test of Android specific code (esp. in libc I added in rust-lang/libc#1622).


Co-authored-by: Yuji Yamamoto <[email protected]>
Co-authored-by: YAMAMOTO Yuji <[email protected]>
igrep pushed a commit to igrep/wasmer that referenced this pull request Mar 19, 2020
I'll send a PR after rust-lang/libc#1622 is merged and released
igrep pushed a commit to igrep/wasmer that referenced this pull request Mar 19, 2020
The new version of libc contains changes necessary to build
wasmer-runtime-core for Android.

See rust-lang/libc#1622 for details.
bors bot added a commit to wasmerio/wasmer that referenced this pull request Mar 19, 2020
1292: Experimental Support for Android (x86_64 and AArch64) r=syrusakbary a=igrep

# Description

Related: #1113

# Current Status

- ~~This pull request is a draft until the next version of libc crate (which should contain rust-lang/libc#1622
    - Now released! 🎉
- I confirmed the tests of wasmer-runtime-core pass on Android x86\_64.
    - The other tests including ones on AArch64 seems too hard so far... 😓 

# Review

- [x] Add a short description of the the change to the CHANGELOG.md file

# Note

I'm happy given any hint to test of Android specific code (esp. in libc I added in rust-lang/libc#1622).


Co-authored-by: Yuji Yamamoto <[email protected]>
Co-authored-by: YAMAMOTO Yuji <[email protected]>
Co-authored-by: Syrus Akbary <[email protected]>
igrep pushed a commit to igrep/wasmer that referenced this pull request Mar 23, 2020
I'll send a PR after rust-lang/libc#1622 is merged and released
igrep pushed a commit to igrep/wasmer that referenced this pull request Mar 23, 2020
The new version of libc contains changes necessary to build
wasmer-runtime-core for Android.

See rust-lang/libc#1622 for details.
bors bot added a commit to wasmerio/wasmer that referenced this pull request Mar 23, 2020
1292: Experimental Support for Android (x86_64 and AArch64) r=syrusakbary a=igrep

# Description

Related: #1113

# Current Status

- ~~This pull request is a draft until the next version of libc crate (which should contain rust-lang/libc#1622
    - Now released! 🎉
- I confirmed the tests of wasmer-runtime-core pass on Android x86\_64.
    - The other tests including ones on AArch64 seems too hard so far... 😓 

# Review

- [x] Add a short description of the the change to the CHANGELOG.md file

# Note

I'm happy given any hint to test of Android specific code (esp. in libc I added in rust-lang/libc#1622).


Co-authored-by: Yuji Yamamoto <[email protected]>
Co-authored-by: YAMAMOTO Yuji <[email protected]>
Co-authored-by: Mark McCaskey <[email protected]>
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.

Question: Why aren't some constans/structs in ucontext.h for x86_64-android?
4 participants