Skip to content

Commit 742dafb

Browse files
committed
1 parent 700a11a commit 742dafb

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

input.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
#[test]
3+
fn test_env_set_get_huge() {
4+
let _ = std::ffi::OsString::new().to_str();
5+
}

mcve_100715.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash -ex
2+
3+
rm -rf build config.toml
4+
./configure --enable-lld --set llvm.ninja=false --set rust.verbose-tests=true --set profile=compiler
5+
# Fails with an ICE
6+
./x.py test --stage=1 --target=x86_64-fortanix-unknown-sgx library/std --host='' --no-doc --exclude src/tools/linkchecker --verbose -j1 || true
7+
8+
# Mininal example triggering the ICE:
9+
build_dir=$(pwd)/build
10+
11+
export RUSTC_LIBDIR="${build_dir}/x86_64-unknown-linux-gnu/stage1/lib"
12+
export RUSTC_REAL="${build_dir}/x86_64-unknown-linux-gnu/stage1/bin/rustc"
13+
export RUSTC_STAGE="1"
14+
export RUSTC_SYSROOT="${build_dir}/x86_64-unknown-linux-gnu/stage1"
15+
16+
std=$(find ${build_dir}/x86_64-unknown-linux-gnu/stage1-std/x86_64-fortanix-unknown-sgx/release/deps/ -name "libstd-*.rlib")
17+
${build_dir}/bootstrap/debug/rustc \
18+
./input.rs \
19+
--test \
20+
--target x86_64-fortanix-unknown-sgx \
21+
--extern std=${std} \
22+
-o $(mktemp)

0 commit comments

Comments
 (0)