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

Constructing LineSegment2F crashes Miri #516

Open
LoganDark opened this issue Jun 25, 2022 · 3 comments
Open

Constructing LineSegment2F crashes Miri #516

LoganDark opened this issue Jun 25, 2022 · 3 comments

Comments

@LoganDark
Copy link

LoganDark commented Jun 25, 2022

Under Miri, pathfinder_simd tries to do something funky:

error: unsupported operation: unimplemented intrinsic: simd_shuffle2
    --> /home/logandark/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/../../stdarch/crates/core_arch/src/x86/
sse2.rs:2780:5
     |
2780 |     simd_shuffle2!(a, b, [0, 2])
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unimplemented intrinsic: simd_shuffle2
     |
     = help: this is likely not a bug in the program; it indicates that the program performed an operation that the interpreter does not support

     = note: inside `std::arch::x86_64::_mm_unpacklo_pd` at /home/logandark/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/../../stdarch/crates/core_arch/src/macros.rs:108:9
     = note: inside `pathfinder_simd::x86::F32x4::concat_xy_xy` at /home/logandark/.cargo/registry/src/github.com-1ecc6299db9ec823/pathfinder_simd-0.5.1/src/x86/mod.rs:359:26
     = note: inside `pathfinder_simd::x86::F32x2::concat_xy_xy` at /home/logandark/.cargo/registry/src/github.com-1ecc6299db9ec823/pathfinder_simd-0.5.1/src/x86/mod.rs:146:9
     = note: inside `pathfinder_geometry::line_segment::LineSegment2F::new` at /home/logandark/.cargo/registry/src/github.com-1ecc6299db9ec823/pathfinder_geometry-0.5.1/src/line_segment.rs:25:23

Literally using a constructor function crashes the interpreter.

I assume this isn't intended?

@s3bk
Copy link
Collaborator

s3bk commented Jun 28, 2022

This does look like a bug in miri.

@LoganDark
Copy link
Author

LoganDark commented Jun 28, 2022

Is it possible to workaround by not using that intrinsic on miri?

@s3bk
Copy link
Collaborator

s3bk commented Jun 28, 2022

You can try enabling https://github.com/servo/pathfinder/blob/master/simd/Cargo.toml#L13

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

No branches or pull requests

2 participants