aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorXi Wang <xi@mit.edu>2013-03-15 10:26:17 +0100
committerJan Beulich <jbeulich@suse.com>2013-03-15 10:26:17 +0100
commit50ae2d0cb625a5c122f27ee69fc2f81479eee33e (patch)
tree95dd5eafc9a6fe4ca2564cca36cfcca591c7587c /docs
parent37d930430c2f2ef4dedf27deb404d2fe2602c039 (diff)
downloadxen-50ae2d0cb625a5c122f27ee69fc2f81479eee33e.tar.gz
xen-50ae2d0cb625a5c122f27ee69fc2f81479eee33e.tar.bz2
xen-50ae2d0cb625a5c122f27ee69fc2f81479eee33e.zip
x86/mm: avoid undefined behavior in IS_NIL()
Since pointer overflow is undefined behavior in C, some compilers such as clang optimize away the check !((ptr) + 1) in the macro IS_NIL(). This patch fixes the issue by casting the pointer type to uintptr_t, the operations of which are well-defined. Signed-off-by: Xi Wang <xi@mit.edu> With that, we also need to avoid the overflow in NIL(). Note that either part of the change results in the respective macros to become unsuitable for use with "void". Signed-off-by: Jan Beulich <jbeulich@suse.com>
Diffstat (limited to 'docs')
0 files changed, 0 insertions, 0 deletions