Florian Krohm 8d6e98bdfd Rewrite badjump and badjump2 such that the error occurs now on the
same line for all architectures.
Promote the s390x exp file to be the golden one because it has the
correct result. Add exp-kfail files for those platforms where the testcases
fail (x86).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12097
2011-10-04 20:14:59 +00:00

20 lines
515 B
C

#include "tests/sys_mman.h"
int main ( void )
{
#if defined(__powerpc64__)
/* on ppc64-linux, a function pointer points to a function
descriptor, not to the function's entry point. Hence to get
uniform behaviour on all supported targets - a jump to an
unmapped page - the following is needed. */
unsigned long long int p[3];
p[0] = (unsigned long long int)get_unmapped_page();
p[1] = 0;
p[2] = 0;
#else
char* p = get_unmapped_page();
#endif
return ((int(*)(void)) p) ();
}