Closed
Description
Running (in qemu and in raspberry pi 3) a hello world binary compiled with xargo and rust nightly-2017-11-16 works as expected. Using rustc nightly-2017-11-17 it segfaults.
Here is a docker file that can be used to reproduce the problem:
FROM ubuntu:17.10
RUN apt-get update
RUN apt-get install \
qemu-user \
curl ca-certificates \
make file \
gcc libc6-dev \
gcc-arm-linux-gnueabi libc6-dev-armel-cross \
-y --no-install-recommends
# change to 2017-11-17 to fail
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain nightly-2017-11-16
ENV PATH=$PATH:/root/.cargo/bin/
RUN rustup component add rust-src
RUN cargo install xargo
ENV USER=root
RUN cargo new hello --bin
RUN mkdir hello/.cargo/
RUN echo "[target.armv5te-unknown-linux-gnueabi]\nlinker = \"arm-linux-gnueabi-gcc\"" > hello/.cargo/config
RUN echo "[target.armv5te-unknown-linux-gnueabi.dependencies.std]\nfeatures = [\"force_alloc_system\"] " > hello/Xargo.toml
RUN echo "\n[profile.release]\npanic = \"abort\"" >> hello/Cargo.toml
ENV CFLAGS_armv5te_unknown_linux_gnueabi="-march=armv5te -mfloat-abi=soft" \
CC_armv5te_unknown_linux_gnueabi=arm-linux-gnueabi-gcc
RUN cd hello && xargo build --release --target armv5te-unknown-linux-gnueabi
RUN QEMU_STRACE=1 qemu-arm -L /usr/arm-linux-gnueabi hello/target/armv5te-unknown-linux-gnueabi/release/hello
According to @Dushistov, the crash happens in __sync_val_compare_and_swap_4
, but I get other result.
Edit: removed the stack trace, it was not helping and it takes to much space.
Metadata
Metadata
Assignees
Labels
No labels