Skip to content

[libc] UB in llvm-project/libc/src/string/memory_utils/utils.h:assume_aligned #64758

@petrhosek

Description

@petrhosek

UBSan running on RISC-V (Fuchsia) is reporting an undefined behavior at

return reinterpret_cast<T *>(__builtin_assume_aligned(ptr, alignment));

assumption of 2 byte alignment for pointer of type 'const __llvm_libc::cpp::byte *' failed, address is 1 aligned

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions