Skip to content

Commit cfdac1e

Browse files
osyoyutianon
andcommitted
Workaround 3.3.0 crash on arm64
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 <[email protected]>
1 parent 7e8e485 commit cfdac1e

File tree

7 files changed

+51
-0
lines changed

7 files changed

+51
-0
lines changed

3.3/alpine3.18/Dockerfile

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

3.3/alpine3.19/Dockerfile

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

3.3/bookworm/Dockerfile

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

3.3/bullseye/Dockerfile

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

3.3/slim-bookworm/Dockerfile

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

3.3/slim-bullseye/Dockerfile

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Dockerfile.template

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,15 @@ RUN set -eux; \
252252
export LIBS='-lucontext'; \
253253
;; \
254254
esac; \
255+
{{ ) else "" end -}}
256+
{{ if .version == "3.3.0" then ( -}}
257+
# workaround crash on arm64
258+
# https://bugs.ruby-lang.org/issues/20085
259+
# https://github.com/ruby/ruby/pull/9385 <- https://github.com/ruby/ruby/pull/9371
260+
wget -O 'arm64-fix.patch' 'https://github.com/ruby/ruby/commit/7f97e3540ce448b501bcbee15afac5f94bb22dd9.patch?full_index=1'; \
261+
echo '86bc65415fd62cb2272a4df249f39fb79db15617ad05c540e05a22f02eae73b3 *arm64-fix.patch' | sha256sum --check --strict; \
262+
patch -p1 -i arm64-fix.patch; \
263+
rm arm64-fix.patch; \
255264
{{ ) else "" end -}}
256265
gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
257266
./configure \

0 commit comments

Comments
 (0)