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

Commit ac7633c

Browse files
committed
Split record_header_indices loop to work around rustc/LLVM bug
rustc issue: rust-lang/rust#55105 Steps to reproduce: ``` rustup target add armv7-linux-androideabi RUSTFLAGS="-Ctarget-feature=+neon" cargo build --target armv7-linux-androideabi --release ``` Output without this change: ``` Compiling hyper v0.12.11 (/home/simon/projects/servo-deps/hyper) LLVM ERROR: ran out of registers during register allocation error: Could not compile `hyper`. ```
1 parent 66a857d commit ac7633c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/proto/h1/role.rs

+2
Original file line numberDiff line numberDiff line change
@@ -924,6 +924,8 @@ fn record_header_indices(bytes: &[u8], headers: &[httparse::Header], indices: &m
924924
let name_start = header.name.as_ptr() as usize - bytes_ptr;
925925
let name_end = name_start + header.name.len();
926926
indices.name = (name_start, name_end);
927+
}
928+
for (header, indices) in headers.iter().zip(indices.iter_mut()) {
927929
let value_start = header.value.as_ptr() as usize - bytes_ptr;
928930
let value_end = value_start + header.value.len();
929931
indices.value = (value_start, value_end);

0 commit comments

Comments
 (0)