-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Array as asm output ICEs LLVM #13368
Comments
visiting for triage. Still reproducible. |
Triage: still reproduces |
Updated the code. |
Triage: this is worse now - no longer an ICE, this now causes all kinds of failures:
|
I don't remember whether we now disable LLVM assertions by default, but that might explain the change. |
LLVM assertions are off by default now, only with |
With LLVM assertions enabled, this still fails with the original error. |
Possibly related to #15402 |
Triage: still reproduces:
|
With llvm-assertions, the error is still in the same place:
The code in question doesn't look able to support direct arrays: Backtrace from GDB:
The LLVM-IR for the call looks like: %arr = alloca [16 x i8], align 1
%0 = call [16 x i8] asm "", "=m,~{dirflag},~{fpsr},~{flags}"(), !srcloc !6
store [16 x i8] %0, [16 x i8]* %arr, align 1 I tried to create a similar input for clang: #include <stdint.h>
#include <stdio.h>
int main() {
uint8_t arr[16];
asm("" : "=m" (arr));
printf("[%i, ..]\n", arr[0]);
return 0;
} The IR here instead gives the array as an indirect parameter for the %2 = alloca [16 x i8], align 16
call void asm "", "=*m,~{dirflag},~{fpsr},~{flags}"([16 x i8]* %2) #2, !srcloc !2 |
ICE is dependent on |
(Although the fact that this can cause |
This matches the definition [used in glacier], which includes exit status 101 without an accompanying diagnostic (such as rust-lang/rust#21599), and when rustc is killed by a signal (rust-lang/rust#13368) This also means no processing modes are capturing stdio, but I didn't remove it as it may be desired for the regex features discussed in rust-lang#53 [used in glacier]: https://github.com/rust-lang/glacier/blob/77029d8e7f755bd95913d3c741738674d5ccadc3/src/lib.rs#L51-L56
This issue does not apply to the new The legacy |
…, r=lowr fix: reorder dyn bounds on render Fixes rust-lang#13368 rust-lang#13192 changed the order of dyn bounds, violating the [contract](https://github.com/rust-lang/rust-analyzer/blob/3a69435af7a1e6273744085cb251adb2b9c30a03/crates/hir-ty/src/display.rs#L896-L901) with `write_bounds_like_dyn_trait()` on render. The projection bounds are expected to come right after the trait bound they are accompanied with. Although the reordering procedure can be made a bit more efficient, I opted for relying only on the [invariants](https://github.com/rust-lang/rust-analyzer/blob/3a69435af7a1e6273744085cb251adb2b9c30a03/crates/hir-ty/src/lower.rs#L995-L998) currently documented in `lower_dyn_trait()`. It's not the hottest path and dyn bounds tend to be short so I believe it shouldn't hurt performance noticeably.
Bump ui_test This should give a bunch of ui improvements when lots of tests are running. Please lmk of any issues with it. Switching to `--quiet` should always avoid any issues, so there's a workaround if anything crops up. Also please check that this does not regress performance for you. It doesn't for me, but that doesn't mean much. changelog: none
The text was updated successfully, but these errors were encountered: