#!/bin/sh
cat <<EOF > prog.c
#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <unistd.h>

int
main (int argc, char ** argv)
{
    malloc(1);
    mlockall(MCL_CURRENT | MCL_FUTURE);
    setuid(getuid());
    printf("Msg1\n");
    setlocale(LC_ALL, "en_US.UTF-8");
    printf("Msg2\n");
    return 0;
}
EOF

gcc -Wall -o prog prog.c
chmod u+s ./prog


