OSDN Git Service

Fix casting a pointer to an integer safely.
authorNicolas Capens <capn@google.com>
Thu, 30 Jun 2016 14:38:12 +0000 (10:38 -0400)
committerNicolas Capens <capn@google.com>
Thu, 30 Jun 2016 14:51:42 +0000 (14:51 +0000)
commit3a795c66126616037657d03e52020213d91ba164
tree0cd1dcbd8a7f01d57a4e00d65a0522aeeb76ae3a
parent19e433d1ef79f93986d9b2751e3558826fbfd048
Fix casting a pointer to an integer safely.

Only casting from an integer (any size) to a pointer using reinterpret_cast<>
is well-defined. Casting a pointer to an integer needs a large enough integer.

Bug 29894961

Change-Id: I51cf6923f4feeaf1860ca0565aa7d40b61918e67
Reviewed-on: https://swiftshader-review.googlesource.com/5750
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
src/OpenGL/libEGL/libEGL.cpp