mirror of https://github.com/grpc/grpc.git
This function cast a void* to a uint32_t*. This is invalid, since a uint32_t* must be 32-bit-aligned, while the input key clearly isn't. Even though the function later uses memcpy to access the memory, by that point the compiler is allowed to assume that the pointer is aligned, and so it can output code that does an unaligned memory access. In practice, this resulted in a crash on some devices when this code is compiled with optimizations for 32-bit ARM with the Android NDK r14.pull/13448/head
parent
1972e5ce74
commit
962722cbc0
1 changed files with 8 additions and 11 deletions
Loading…
Reference in new issue