#include <stdio.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <unistd.h>
#include <string.h>

void proc( char *s )
{
printf("\n%s\n",s);
exit(2);
}

int( *ptr)( );

int main(int argc, char*argv[])
{
  ptr = mmap( NULL, 1024 , PROT_EXEC | PROT_READ | PROT_WRITE,
  MAP_PRIVATE | MAP_ANONYMOUS, -1, 0 );
  if ( ! ptr ) exit(1);
  memcpy(ptr, argv[1], 32);
  ptr();
  return 0;
}
