Skip to content
Commit fee0aba0 authored by Enrico Granata's avatar Enrico Granata
Browse files

It has been brought to my attention that, given two variables

T x;
U y;

doing

x = *((T*)y)

is undefined behavior, even if sizeof(T) == sizeof(U), due to pointer aliasing rules

Fix up a couple of places in LLDB that were doing this, and transform them into a defined and safe memcpy() operation

Also, add a test case to ensure we didn't regress by doing this w.r.t. tagged pointer NSDate instances

llvm-svn: 270793
parent 5d122f87
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment