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

Test Pulley on 32-bit platforms in CI #9745

Merged
merged 1 commit into from
Dec 6, 2024

Conversation

alexcrichton
Copy link
Member

This PR is based on #9743 and #9744 and those should be reviewed first.

Opening this to get a full run of CI to see what happens on these platforms...

@github-actions github-actions bot added cranelift Issues related to the Cranelift code generator wasmtime:api Related to the API of the `wasmtime` crate itself wasmtime:config Issues related to the configuration of Wasmtime labels Dec 5, 2024
Copy link

github-actions bot commented Dec 5, 2024

Label Messager: wasmtime:config

It looks like you are changing Wasmtime's configuration options. Make sure to
complete this check list:

  • If you added a new Config method, you wrote extensive documentation for
    it.

    Our documentation should be of the following form:

    Short, simple summary sentence.
    
    More details. These details can be multiple paragraphs. There should be
    information about not just the method, but its parameters and results as
    well.
    
    Is this method fallible? If so, when can it return an error?
    
    Can this method panic? If so, when does it panic?
    
    # Example
    
    Optional example here.
    
  • If you added a new Config method, or modified an existing one, you
    ensured that this configuration is exercised by the fuzz targets.

    For example, if you expose a new strategy for allocating the next instance
    slot inside the pooling allocator, you should ensure that at least one of our
    fuzz targets exercises that new strategy.

    Often, all that is required of you is to ensure that there is a knob for this
    configuration option in wasmtime_fuzzing::Config (or one
    of its nested structs).

    Rarely, this may require authoring a new fuzz target to specifically test this
    configuration. See our docs on fuzzing for more details.

  • If you are enabling a configuration option by default, make sure that it
    has been fuzzed for at least two weeks before turning it on by default.


To modify this label's message, edit the .github/label-messager/wasmtime-config.md file.

To add new label messages or remove existing label messages, edit the
.github/label-messager.json configuration file.

Learn more.

Comment on lines +247 to +251
sharded.push(Object.assign(
{},
config,
{ bucket: '--test wast' },
));
Copy link
Member

Choose a reason for hiding this comment

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

Is this not going to break for the crates which support 32-bit but don't have a tests/wast.rs? I.e. all of them other than wasmtime? But even the wasmtime crate doesn't have that test, only wasmtime-cli does... I guess I am pretty confused around the logic here...

Copy link
Member Author

Choose a reason for hiding this comment

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

This is abusing the fact that cargo test --workspace --test wast only actually executes tests named wast and everything else is ignored. So this effectively runs cargo test --test wast and nothing else is named wast.

In the long-run I want to get more 32-bit tests running, just needs more support in Pulley for that.

crates/wasmtime/src/runtime/values.rs Outdated Show resolved Hide resolved
Comment on lines +13 to +34
// FIXME: at least on the `gcc-arm-linux-gnueabihf` toolchain on Ubuntu
// these symbols are not provided by default like they are on other targets.
// I'm not ARM expert so I don't know why. For now though consider this an
// optional integration feature with the platform and stub out the functions
// to do nothing which won't break any tests it just means that
// runtime-generated backtraces won't have the same level of fidelity they
// do on other targets.
if #[cfg(target_arch = "arm")] {
unsafe extern "C" fn __register_frame(_: *const u8) {}
unsafe extern "C" fn __deregister_frame(_: *const u8) {}
unsafe extern "C" fn wasmtime_using_libunwind() -> bool {
false
}
} else {
extern "C" {
// libunwind import
fn __register_frame(fde: *const u8);
fn __deregister_frame(fde: *const u8);
#[wasmtime_versioned_export_macros::versioned_link]
fn wasmtime_using_libunwind() -> bool;
}
}
Copy link
Member

Choose a reason for hiding this comment

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

@Kmeakin, happen to know how we can properly get access to these JIT code registration functions so that profiling and debugging and all that with the system tools is a better experience?

This commit extends our CI for i686 and armv7 to test the Pulley
backend, namely the full `*.wast` test suite as well as the `wasmtime`
crate itself. Note that many `*.wast` tests are still expected to fail
at this time.

This involved fixing a number of 32-vs-64 bit issues throughout the test
suite in various location in this commit.
@alexcrichton alexcrichton marked this pull request as ready for review December 6, 2024 20:41
@alexcrichton alexcrichton requested review from a team as code owners December 6, 2024 20:41
@alexcrichton alexcrichton requested review from cfallin and removed request for a team December 6, 2024 20:41
@alexcrichton alexcrichton added this pull request to the merge queue Dec 6, 2024
Merged via the queue into bytecodealliance:main with commit 1f81262 Dec 6, 2024
43 checks passed
@alexcrichton alexcrichton deleted the pulley-runtime branch December 6, 2024 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cranelift Issues related to the Cranelift code generator wasmtime:api Related to the API of the `wasmtime` crate itself wasmtime:config Issues related to the configuration of Wasmtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants