Skip to content

rand_xoshiro crate = runtime error #203

Open
@brandonros

Description

@brandonros

Reproduction:

#[kernel]
#[allow(improper_ctypes_definitions, clippy::missing_safety_doc)]
pub unsafe fn find_vanity_private_key(a: &[u8]) {
    let idx = thread::index_1d() as usize;

    let mut rng_seed: u64 = 42; // TODO: make this unique for each thread?
    let mut num_iterations: u64 = 0;

    for _ in 0..10000 {
        // generate random input for seed
        let mut rng = Xoroshiro128StarStar::seed_from_u64(rng_seed); // if i change this to MockXoroshiro128StarStar it works fine
        let mut input = [0u8; 32];
        rng.fill_bytes(&mut input);
         ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions