Associated Code:
write(-1, "test", sizeof("test")); void * p = malloc(1024); void * p2 = malloc(510); write(-1, "hi", sizeof("hi"));
Corresponding strace output:
write(4294967295, "test\0", 5) = -1 EBADF (Bad file descriptor) brk(0) = 0x601000 brk(0x622000) = 0x622000 write(4294967295, "hi\0", 3) = -1 EBADF (Bad file descriptor)
Am I surprised that such a low-level operation is not related to syscall?
source share