[Bug] Use mremap() to allocate a dual mapped region on NetBSD

In addition, always enable DualMapping when RWX pages are not
possible to allocate in JitAllocator, because otherwise the
allocator would not be able to allocate memory for JIT code
execution.

New CI runners to test FreeBSD, NetBSD, and OpenBSD are also
provided.
This commit is contained in:
kobalicek
2023-02-23 00:28:27 +01:00
parent 8c31a8f34f
commit 9d33c892f7
5 changed files with 4082 additions and 3827 deletions

View File

@@ -149,3 +149,93 @@ jobs:
- name: "Test"
run: python build-actions/action.py --step=test
build-vm:
strategy:
fail-fast: false
matrix:
include:
- { host: "macos-12", os: "freebsd", osver: "13.1", cc: "clang", arch: "x86-64", build_type: "Release", defs: "ASMJIT_TEST=ON" }
- { host: "macos-12", os: "openbsd", osver: "7.2" , cc: "clang", arch: "x86-64", build_type: "Release", defs: "ASMJIT_TEST=ON" }
name: "${{matrix.os}}-${{matrix.osver}} (${{matrix.cc}}, ${{matrix.arch}}, ${{matrix.build_type}})"
runs-on: ${{matrix.host}}
steps:
- name: "Checkout"
uses: actions/checkout@v3
with:
path: "source"
- name: "Checkout Build Actions"
uses: actions/checkout@v3
with:
repository: build-actions/build-actions
path: "build-actions"
- name: Build & Test in VM
uses: cross-platform-actions/action@master
with:
operating_system: ${{matrix.os}}
architecture: ${{matrix.arch}}
version: ${{matrix.osver}}
shell: bash
run: |
set -e
PATH="/usr/sbin:/usr/pkg/sbin:/usr/pkg/bin:$PATH:$(pwd)/build-actions"
export PATH
sh ./build-actions/install-python3.sh
python3 build-actions/action.py \
--step=all \
--compiler=${{matrix.cc}} \
--architecture=${{matrix.arch}} \
--source-dir=source \
--config=source/.github/workflows/build-config.json \
--build-type=${{matrix.build_type}} \
--build-defs=${{matrix.defs}}
build-netbsd:
strategy:
fail-fast: false
matrix:
include:
- { title: "netbsd", host: "macos-12", os: "netbsd", cc: "clang", arch: "x86_64", build_type: "Release", defs: "ASMJIT_TEST=ON" }
name: "${{matrix.title}} (${{matrix.cc}}, ${{matrix.arch}}, ${{matrix.build_type}})"
runs-on: ${{matrix.host}}
steps:
- name: "Checkout"
uses: actions/checkout@v3
with:
path: "source"
- name: "Checkout Build Actions"
uses: actions/checkout@v3
with:
repository: build-actions/build-actions
path: "build-actions"
- name: Build & Test (VM)
uses: vmactions/netbsd-vm@v0
with:
mem: 6144
usesh: true
copyback: false
run: |
set -e
PATH="/usr/sbin:/usr/pkg/sbin:/usr/pkg/bin:$PATH:$(pwd)/build-actions"
export PATH
bash ./build-actions/install-python3.sh
python3 ./build-actions/action.py \
--step=all \
--compiler=${{matrix.cc}} \
--architecture=${{matrix.arch}} \
--source-dir=source \
--config=source/.github/workflows/build-config.json \
--build-type=${{matrix.build_type}} \
--build-defs=${{matrix.defs}}