Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

Docker: build libstd/libcore without vectorization #116

Closed
wants to merge 1 commit into from

Conversation

alastairreid
Copy link
Contributor

This fixes linking errors we were getting due to compiling libstd/libcore
with vectorization enabled and compiling code we are verifying
with vectorization disabled.

This fixes linking errors we were getting due to compiling libstd/libcore
with vectorization enabled and compiling code we are verifying
with vectorization disabled.
@google-cla google-cla bot added the cla: yes Contributor has signed CLA label Mar 18, 2021
@alastairreid
Copy link
Contributor Author

Sadly, this doesn't seem to help.
Which is a shame because it takes hours to rebuild it...

@alastairreid
Copy link
Contributor Author

What I have learned:

  • Building libcore with -sse2 disabled results in ld.lld errors about SSE2 register returns with SSE2 disabled

    ld.lld: error: /home/adreid/.cargo/registry/src/github.com-1ecc6299db9ec823/clap-2.33.3/src/suggestions.rs:22:26: in function ZN4clap11suggestions24did_you_mean_flag_suffix28$u7b$$u7b$closure$u7d$$u7d$17h4e49fad07f2d71f3E void (%"core::option::Option<(usize, (alloc::string::String, core::option::Option<&str>))>", { i64, i64* }, %"clap::app::App"): SSE2 register return with SSE2 disabled

  • Enabling SSE2 in both libcore/libstd and when compiling normal crates (e.g., hashbrown, encoding-rs, etc.) avoids compilation/linking errors but results in bitcode files with hand-vectorized code in them. These cause KLEE to abort exploring paths with a warning message about pmovmskb. Inspecting the files, it is clear that this is just a common first instruction in a sequence and we would have to implement many more of these instructions in KLEE or rvt-patch-llvm.

  • Inspecting the code of libraries like hashbrown and vectorization is normally enabled on x86 and x86_64 but disabled with miri - so maybe enabling the miri feature would disable the hand-vectorized code?

@alastairreid
Copy link
Contributor Author

This has been replaced by #125 (which, unfortunately doesn't work)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes Contributor has signed CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant