Skip to content

Commit

Permalink
Workaround 3.3.0 crash on arm64
Browse files Browse the repository at this point in the history
Ruby 3.3.0 has a bug which crashes many programs on arm64.
https://bugs.ruby-lang.org/issues/20085

This bug is fixed in upstream (ruby/ruby#9371)
and is planned to be backported, but no date is given yet for the 3.3.1
release.

This patch workarounds this bug by applying the upstream fix/backport in
ruby/ruby#9385 .

Co-authored-by: Tianon Gravi <admwiggin@gmail.com>
  • Loading branch information
osyoyu and tianon committed Feb 17, 2024
1 parent 7e8e485 commit cfdac1e
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 0 deletions.
7 changes: 7 additions & 0 deletions 3.3/alpine3.18/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions 3.3/alpine3.19/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions 3.3/bookworm/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions 3.3/bullseye/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions 3.3/slim-bookworm/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions 3.3/slim-bullseye/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,15 @@ RUN set -eux; \
export LIBS='-lucontext'; \
;; \
esac; \
{{ ) else "" end -}}
{{ if .version == "3.3.0" then ( -}}
# workaround crash on arm64
# https://bugs.ruby-lang.org/issues/20085
# https://github.com/ruby/ruby/pull/9385 <- https://github.com/ruby/ruby/pull/9371
wget -O 'arm64-fix.patch' 'https://github.com/ruby/ruby/commit/7f97e3540ce448b501bcbee15afac5f94bb22dd9.patch?full_index=1'; \
echo '86bc65415fd62cb2272a4df249f39fb79db15617ad05c540e05a22f02eae73b3 *arm64-fix.patch' | sha256sum --check --strict; \
patch -p1 -i arm64-fix.patch; \
rm arm64-fix.patch; \
{{ ) else "" end -}}
gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
./configure \
Expand Down

0 comments on commit cfdac1e

Please sign in to comment.