Skip to content

issue-13560.rs is flaky on 64-bit OSX #19501

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

Closed
alexcrichton opened this issue Dec 3, 2014 · 1 comment
Closed

issue-13560.rs is flaky on 64-bit OSX #19501

alexcrichton opened this issue Dec 3, 2014 · 1 comment
Labels
O-macos Operating system: macOS

Comments

@alexcrichton
Copy link
Member

Tracking issue for this failure:


failures:

---- [pretty] run-pass-fulldeps/issue-13560.rs stdout ----

error: auxiliary build of /Users/rustbuild/src/rust-buildbot/slave/auto-mac-64-nopt-t/build/src/test/auxiliary/issue-13560-3.rs failed to compile: 
status: exit code: 101
command: x86_64-apple-darwin/stage2/bin/rustc /Users/rustbuild/src/rust-buildbot/slave/auto-mac-64-nopt-t/build/src/test/auxiliary/issue-13560-3.rs -L x86_64-apple-darwin/test/run-pass-fulldeps --target=x86_64-apple-darwin -L x86_64-apple-darwin/test/run-pass-fulldeps/issue-13560.stage2-x86_64-apple-darwinlibaux --out-dir x86_64-apple-darwin/test/run-pass-fulldeps/issue-13560.stage2-x86_64-apple-darwinlibaux --cfg rtopt --cfg debug -L x86_64-apple-darwin/rt
stdout:
------------------------------------------
task 'rustc' panicked at 'index out of bounds: the len is 2952 but the index is 2952', /Users/rustbuild/src/rust-buildbot/slave/auto-mac-64-nopt-t/build/src/librbml/lib.rs:155



------------------------------------------
stderr:
------------------------------------------
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace

------------------------------------------

task '[pretty] run-pass-fulldeps/issue-13560.rs' panicked at 'explicit panic', /Users/rustbuild/src/rust-buildbot/slave/auto-mac-64-nopt-t/build/src/compiletest/runtest.rs:1487
alexcrichton added a commit to alexcrichton/rust that referenced this issue Dec 3, 2014
I don't have enough time to investigate this thoroughly, so for now let's get
the queue moving by ignoring this test.

cc rust-lang#19501
@alexcrichton
Copy link
Member Author

It appears that the compiler is producing corrupt metadata somehow. I have modified the test to ignore issue-13560-1 and only link to issue-13560-2, and I've found an interesting phenomena. When running the test via make the rlib for -2 may end up containing two blobs of metadata. One blob of metadata ends in four 0x0a bytes (corrupted), and the other blob is the exact same but without these trailing bytes.

The compilation of the -3 crate is the one that's failing, and it will deterministically fail depending on the metadata of the -2 crate. I do not currently know where the extra bytes come from, still trying to track that down...

bors added a commit that referenced this issue Dec 3, 2014
I don't have enough time to investigate this thoroughly, so for now let's get
the queue moving by ignoring this test.

cc #19501
@huonw huonw added the O-macos Operating system: macOS label Dec 6, 2014
bors added a commit that referenced this issue Dec 9, 2014
One of the causes of #19501 was that the metadata on OSX was getting corrupted.
For any one particular invocation of the compiler the metadata file inside of an
rlib archive would have extra bytes appended to the end of it. These extra bytes
end up confusing rbml and have it run off the end of the array (resulting in the
out of bounds detected).

This commit prepends the length of metadata to the start of the metadata to
ensure that we always slice the precise amount that we want, and it also
un-ignores the test from #19502.

Closes #19501
lnicola pushed a commit to lnicola/rust that referenced this issue Apr 28, 2025
fix: Fix a bug in MBE expansion that arose from incorrect fixing of an older bug in MBE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-macos Operating system: macOS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants