// https://syzkaller.appspot.com/bug?id=ddf389071baf9399451103c8316bd602bb0690cb
// autogenerated by syzkaller (http://github.com/google/syzkaller)

#define _GNU_SOURCE

#include <sys/syscall.h>
#include <unistd.h>

#include <stdint.h>
#include <string.h>

static void test();

void loop()
{
  while (1) {
    test();
  }
}

#ifndef __NR_mmap
#define __NR_mmap 192
#endif
#ifndef __NR_socket
#define __NR_socket 359
#endif
#ifndef __NR_bind
#define __NR_bind 361
#endif
#undef __NR_mmap
#define __NR_mmap __NR_mmap2

long r[1];
void test()
{
  memset(r, -1, sizeof(r));
  syscall(__NR_mmap, 0x20000000ul, 0x2ee000ul, 0x3ul, 0x32ul,
          0xfffffffffffffffful, 0x0ul);
  r[0] = syscall(__NR_socket, 0x26ul, 0x5ul, 0x0ul);
  *(uint16_t*)0x202ebfa8 = (uint16_t)0x26;
  memcpy((void*)0x202ebfaa,
         "\x61\x65\x61\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
         14);
  *(uint32_t*)0x202ebfb8 = (uint32_t)0x1;
  *(uint32_t*)0x202ebfbc = (uint32_t)0x400;
  memcpy((void*)0x202ebfc0,
         "\x70\x63\x72\x79\x70\x74\x28\x72\x66\x63\x34\x31\x30\x36\x2d"
         "\x67\x63\x6d\x2d\x61\x65\x73\x6e\x69\x29\x00\x00\x00\x00\x00"
         "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
         "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
         "\x00\x00\x00\x00",
         64);
  syscall(__NR_bind, r[0], 0x202ebfa8ul, 0x58ul);
}

int main()
{
  loop();
  return 0;
}