Skip to content

Commit 4855bb0

Browse files
committed
Workaround 3.3.0 crash on aarch64
Ruby 3.3.0 has a bug which crashs many practical programs on linux-aarch64 (especially on Linux VMs on macOS, e.g. Docker Desktop). https://bugs.ruby-lang.org/issues/20085 This bug is fixed in upstream and is planned to be backported, but no date is given yet for the 3.3.1 release. ruby/ruby#9371 This patch workarounds this bug by passing ASFLAGS to ./configure as described in https://bugs.ruby-lang.org/issues/20085#note-5 .
1 parent 7e8e485 commit 4855bb0

File tree

7 files changed

+30
-0
lines changed

7 files changed

+30
-0
lines changed

3.3/alpine3.18/Dockerfile

Lines changed: 4 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: 4 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: 4 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: 4 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: 4 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: 4 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: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,12 @@ RUN set -eux; \
252252
export LIBS='-lucontext'; \
253253
;; \
254254
esac; \
255+
{{ ) else "" end -}}
256+
{{ if .version | . == "3.3.0" then ( -}}
257+
# workaround crash on aarch64 Linux (e.g. Docker Desktop on macOS)
258+
# https://bugs.ruby-lang.org/issues/20085#note-5
259+
# https://github.com/ruby/ruby/pull/9371
260+
export ASFLAGS="${ASFLAGS:-} -mbranch-protection=pac-ret"; \
255261
{{ ) else "" end -}}
256262
gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
257263
./configure \

0 commit comments

Comments
 (0)