rand_check pid

This commit is contained in:
Ciro Santilli
2017-10-07 07:21:08 +01:00
parent 4768027b9e
commit f3253d5109

View File

@@ -11,7 +11,9 @@
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <time.h>
#include <unistd.h>
int bss = 0;
int data = 1;
@@ -21,13 +23,17 @@ int main(__attribute__((unused)) int argc, char **argv) {
uint64_t uint64;
FILE *fp;
printf("time(NULL) = %ju\n", (uintmax_t)time(NULL));
/* Loaded addresses. */
printf("&i = %p\n", (void *)&i);
printf("&argv[0] = %p\n", (void *)&argv[0]);
printf("&main = %p\n", (void *)(intptr_t)main);
printf("&bss = %p\n", (void *)&bss);
printf("&data = %p\n", (void *)&data);
/* Misc syscalls. */
printf("time(NULL) = %ju\n", (uintmax_t)time(NULL));
printf("pid = %ju\n", (uintmax_t)getpid());
/* malloc */
ip = malloc(sizeof(*ip));
printf("&malloc = %p\n", (void *)ip);