Here's a valid Rust snippet:
fn main() {
let mut range = 0..5;
for num in &mut range {
if num == 2 {
break;
}
}
diff --git a/src/platform.rs b/src/platform.rs | |
index cd8ef63..4452780 100644 | |
--- a/src/platform.rs | |
+++ b/src/platform.rs | |
@@ -292,13 +292,13 @@ impl Platform { | |
return; | |
} | |
match self { | |
- // Safe because detect() checked for platform support. | |
- #[cfg(blake3_avx512_ffi)] |
def open_ten_files(): | |
files = [open("/dev/null") for _ in range(10)] | |
silly_map1 = {"files": files} | |
silly_map2 = {"files": files} | |
silly_map1["other_map"] = silly_map2 | |
silly_map2["other_map"] = silly_map1 | |
return silly_map1 | |
mylist = [] | |
max_len = 5 |
#include <cstdint> | |
#include <cstdio> | |
#include <mutex> | |
#define GLOG_USE_GLOG_EXPORT | |
#include <folly/Synchronized.h> | |
class IntBumper { | |
public: | |
IntBumper(uint64_t &x) : m_ptr(&x) {} |
use std::ptr; | |
pub struct List<T> { | |
head: Link<T>, | |
tail: *mut Node<T>, // DANGER DANGER | |
} | |
type Link<T> = Option<Box<Node<T>>>; | |
struct Node<T> { |
fn main() { | |
let my_string = String::from("foo"); | |
let mut my_vec = Vec::<&String>::new(); | |
my_vec.push(&my_string); | |
// drop(my_string); | |
println!("{:?}", my_vec); | |
} |
fn foo<'left, 'right>(_: &mut &'left i32, _: &mut &'right i32) | |
where | |
'left: 'right, | |
{ | |
} | |
// fn foo<'both>(_: &mut &'both i32, _: &mut &'both i32) {} | |
fn main() { | |
let a = 42; |
#include <iostream> | |
struct Foo { | |
const int &x; | |
}; | |
struct ConvertedFoo { | |
const int &x; | |
// Foo is implicitly convertible to ConvertedFoo |
import time | |
from blake3 import blake3 | |
from hashlib import sha256, sha512, blake2s | |
input_bytes = b"hello world" | |
print(f"input bytes: {input_bytes}") | |
warmup_iterations = 1_000 | |
measure_iterations = 1_000_000 |
Here's a valid Rust snippet:
fn main() {
let mut range = 0..5;
for num in &mut range {
if num == 2 {
break;
}
}
GCC 13.1.1 (Arch Linux) seems to mis-align __m512i
vectors on the stack when
-fsanitize=address
is enabled. repro.c
(below in this Gist) is a minimized
repro. Compile it like this:
gcc repro.c -g -mavx512f -fsanitize=address
When I execute it I get the following:
$ ./a.out
AddressSanitizer:DEADLYSIGNAL