10 #if defined __GNUC__ && !defined __INTEL_COMPILER
11 __builtin___bnd_store_ptr_bounds ((void**)&ptr
, ptr
);
14 #if defined __GNUC__ && !defined __INTEL_COMPILER
15 __builtin___bnd_store_ptr_bounds ((void**)&tmp
, tmp
);
17 tmp
= (int*)0x2; // Break 2.
23 main(int argc
, char const *argv
[])
25 // This call returns 0 only if the CPU and the kernel support
26 // Intel(R) Memory Protection Extensions (Intel(R) MPX).
27 if (prctl(PR_MPX_ENABLE_MANAGEMENT
, 0, 0, 0, 0) != 0)
30 int* a
= (int *) calloc(size
, sizeof(int));
31 #if defined __GNUC__ && !defined __INTEL_COMPILER
32 __builtin___bnd_store_ptr_bounds ((void**)&a
, a
);