Skip to content

Commit

Permalink
Merge pull request #1 from resin-io/reapply-2.5.x-patches
Browse files Browse the repository at this point in the history
Reapply 2.5.x patches
  • Loading branch information
CameronDiver authored Nov 16, 2016
2 parents 1dc33ed + b9193e3 commit c4a0e0c
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 0 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Dockerfile
27 changes: 27 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Use this dockerfile to build the qemu binary

FROM debian:jessie

RUN apt-get update \
&& apt-get install -y \
autoconf \
bison \
build-essential \
flex \
libglib2.0-dev \
libtool \
make \
pkg-config \
python \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /usr/src/qemu

COPY . /usr/src/qemu


ARG TARGET_ARCH=arm-linux-user
RUN ./configure --target-list=$TARGET_ARCH --static

RUN make -j $(nproc)
21 changes: 21 additions & 0 deletions linux-user/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,27 @@ int do_sigaction(int sig, const struct target_sigaction *act,
}

k = &sigact_table[sig - 1];

/* This signal will always fail. This causes golang crash since
* https://github.com/golang/go/commit/675eb72c285cd0dd44a5f280bb3fa456ddf6de16
*
* As explained in that commit, these signals are very rarely used in a
* way that causes problems, so it's ok-ish to ignore one of them here.
*/
if (sig == 33) {
return 0;
}
/* This signal will fail because QEMU uses SIGRTMAX for itself. This causes
* golang to crash for versions earlier than
* https://github.com/golang/go/commit/d10675089d74db0408f2432eae3bd89a8e1c2d6a
*
* Since after that commit golang ignores that signal, we also ignore it here to
* allow earlier versions to run as well.
*/
if (sig == 64) {
return 0;
}

if (oact) {
__put_user(k->_sa_handler, &oact->_sa_handler);
__put_user(k->sa_flags, &oact->sa_flags);
Expand Down

0 comments on commit c4a0e0c

Please sign in to comment.