Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/check.jvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ jobs:
steps:
- name: Harden runner
if: runner.os == 'Linux'
uses: step-security/harden-runner@dc2769abcc0fcfbadfc1df54081c1608579ef6b2 # v2.22.2
uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: jdx/mise-action@8418fedb1110381a0d3ba51a7a415d7c1b884550 # v5.2.2
- uses: jdx/mise-action@6be3c7ed4c21d4f76b208d351d95aac273ebb76d # v5.2.4
with:
version: '2026.9.10'
# Keep the stock JVM test matrix authoritative after Mise's development JDK.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check.native-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
steps:
- name: Harden runner
if: runner.os == 'Linux'
uses: step-security/harden-runner@dc2769abcc0fcfbadfc1df54081c1608579ef6b2 # v2.22.2
uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3
with:
egress-policy: audit
- name: Checkout
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/check.rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
steps:
- name: Harden runner
if: runner.os == 'Linux'
uses: step-security/harden-runner@dc2769abcc0fcfbadfc1df54081c1608579ef6b2 # v2.22.2
uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3
with:
egress-policy: audit
- name: Checkout
Expand All @@ -29,7 +29,7 @@ jobs:
- name: Check generated C exports
if: runner.os == 'Linux'
run: python3 tools/generate_exports.py --check
- uses: jdx/mise-action@8418fedb1110381a0d3ba51a7a415d7c1b884550 # v5.2.2
- uses: jdx/mise-action@6be3c7ed4c21d4f76b208d351d95aac273ebb76d # v5.2.4
if: runner.os == 'Linux'
with:
version: '2026.9.10'
Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
timeout-minutes: 45
steps:
- name: Harden runner
uses: step-security/harden-runner@dc2769abcc0fcfbadfc1df54081c1608579ef6b2 # v2.22.2
uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3
with:
egress-policy: audit
- name: Checkout
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/job.build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
steps:
- name: Harden runner
if: runner.os == 'Linux'
uses: step-security/harden-runner@dc2769abcc0fcfbadfc1df54081c1608579ef6b2 # v2.22.2
uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3
with:
egress-policy: audit
- name: Checkout
Expand All @@ -26,7 +26,7 @@ jobs:
run: python3 -c 'import json; print("version=" + json.load(open("tools/versions.json"))["llvm"]["toolchain_version"])' >> "$GITHUB_OUTPUT"
- name: Install Elide native toolchain
id: native-toolchain
uses: elide-dev/toolchain/action@171eb7cde379e17822e042cfbda26c9740c10b03
uses: elide-dev/toolchain/action@4677dd77b520b609bb0e548e6e7a4dadadbb2d14
with:
version: ${{ steps.native-version.outputs.version }}
target: ${{ runner.os == 'Linux' && 'x86_64-unknown-linux-gnu' || 'arm64-apple-darwin' }}
Expand Down
7 changes: 7 additions & 0 deletions tests/sanitizer/SanitizerCanary.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import java.lang.foreign.ValueLayout;
import java.lang.invoke.MethodHandle;
import java.nio.file.Path;
import java.util.concurrent.CountDownLatch;

/** Calls a deliberately defective native library through FFM; the sanitizer must abort it. */
public final class SanitizerCanary {
Expand All @@ -26,18 +27,24 @@ public static void main(String[] args) throws Throwable {
symbols.find("bemo_canary_race").orElseThrow(),
FunctionDescriptor.ofVoid(ValueLayout.JAVA_INT));
Thread[] threads = new Thread[4];
CountDownLatch ready = new CountDownLatch(threads.length);
CountDownLatch start = new CountDownLatch(1);
for (int index = 0; index < threads.length; index++) {
threads[index] =
Thread.ofPlatform()
.start(
() -> {
try {
ready.countDown();
start.await();
race.invokeExact(100_000);
} catch (Throwable failure) {
throw new AssertionError(failure);
}
});
}
ready.await();
start.countDown();
for (Thread thread : threads) {
thread.join();
}
Expand Down
4 changes: 3 additions & 1 deletion tests/sanitizer/canary.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ int32_t bemo_canary_overflow(void) {
}

/* Unsynchronized counter written from several Java threads: TSAN must report it. */
static uint64_t counter;
/* Keep repeated loads/stores; an optimized counter += iterations can finish
* before the other callers enter. Volatile does not make these accesses atomic. */
static volatile uint64_t counter;

void bemo_canary_race(int32_t iterations) {
for (int32_t index = 0; index < iterations; index++) {
Expand Down
Loading