Skip to content

Safety of intrinsics #355

Closed
Closed
@fpoli

Description

@fpoli

Shouldn't mem::__llvm_memcpy_element_unordered_atomic_1 and similar functions be marked as unsafe? The following program crashes with "Segmentation fault (core dumped)".

// compiler_builtins = "=0.1.23"

extern crate compiler_builtins;

fn main() {
    compiler_builtins::mem::__llvm_memcpy_element_unordered_atomic_1(
        std::ptr::null::<u128>() as *mut u8,
        std::ptr::null(),
        1
    );
}

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