Skip to content

[libc] Suspected strict aliasing violation in string_length_wide_read #120709

@Voultapher

Description

@Voultapher

The following code in libc:

for (; reinterpret_cast<uintptr_t>(char_ptr) % sizeof(Word) != 0;

invokes what I understand to be strict aliasing UB. I think block reads would have to go through memcpy/__builtin_memcpy which can then be optimized by the compiler as appropriate.

Tagging @michaelrj-google.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions