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
8 changes: 4 additions & 4 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ tokio = { version = "1", default-features = false, features = ["net", "io-util",
socket2 = { version = "0.6", features = ["all"] }
libc = { version = "0" }
rustls = { version = "=0.23.46", default-features = false }
aws-lc-rs = { version = "=1.18.2", default-features = false }
aws-lc-rs = { version = "=1.19.0", default-features = false }
libmimalloc-sys = { version = "=0.1.49" }

[workspace.lints.rust]
Expand Down
8 changes: 4 additions & 4 deletions fuzz/Cargo.lock

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

8 changes: 4 additions & 4 deletions tests/embedder/Cargo.lock

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

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