Skip to content

Commit

Permalink
Merge pull request ocaml#12918 from mndrix/nobtcfi
Browse files Browse the repository at this point in the history
Disable control flow integrity on OpenBSD
  • Loading branch information
gasche authored Jan 19, 2024
2 parents b851fea + 3a12d03 commit b6ecc23
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -2325,6 +2325,10 @@ OCaml 4.14 maintenance version
(Xavier Leroy and Anil Madhavapeddy, review by Anil Madhavapeddy and
Sébastien Hinderer)

- #12903: Disable control flow integrity on OpenBSD >= 7.4 to avoid
illegal instruction errors on certain CPUs.
(Michael Hendricks, review by Miod Vallat)

### Bug fixes:

- #12878: fix incorrect treatment of injectivity for private recursive types.
Expand Down
11 changes: 11 additions & 0 deletions configure

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

8 changes: 8 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1211,6 +1211,14 @@ AS_CASE([$host],
[oc_ldflags="$oc_ldflags -Wl,--no-execute-only"
natdynlinkopts="$natdynlinkopts -Wl,--no-execute-only"])

# Disable control flow integrity

AS_CASE([$host],
[[*-*-openbsd7.[4-9]|*-*-openbsd[89].*]],
[oc_ldflags="$oc_ldflags -Wl,-z,nobtcfi"
natdynlinkopts="$natdynlinkopts -Wl,-z,nobtcfi"])


# Configure native dynlink

natdynlink=false
Expand Down

0 comments on commit b6ecc23

Please sign in to comment.