execsp
struct execsp execsp;
memset(&execsp, 0, sizeof(execsp));
execsp.startsp = startsp;
execsp.ctorsp = ctorsp;
execsp.mainsp = mainsp;
execsp.dtorsp = dtorsp;
nwrit = write(STDOUT_FILENO, &execsp, sizeof(execsp));
if ((size_t)nwrit != sizeof(execsp))
errx(1, "wrote %zu != %zu", (size_t)nwrit, sizeof(execsp));
RL(nread = read(fd[0], &execsp, sizeof(execsp)));
ATF_CHECK_MSG((size_t)nread == sizeof(execsp),
(size_t)nread, sizeof(execsp));
if ((size_t)nread != sizeof(execsp))
printf("start sp @ %p\n", execsp.startsp);
printf("ctor sp @ %p\n", execsp.ctorsp);
printf("main sp @ %p\n", execsp.mainsp);
printf("dtor sp @ %p\n", execsp.dtorsp);
ATF_CHECK_MSG(((uintptr_t)execsp.startsp & STACK_ALIGNBYTES) == 0,
execsp.startsp);
ATF_CHECK_MSG(((uintptr_t)execsp.ctorsp & STACK_ALIGNBYTES) == 0,
execsp.ctorsp);
ATF_CHECK_MSG(((uintptr_t)execsp.mainsp & STACK_ALIGNBYTES) == 0,
execsp.mainsp);
ATF_CHECK_MSG(((uintptr_t)execsp.dtorsp & STACK_ALIGNBYTES) == 0,
execsp.dtorsp);
if (execsp.startsp == NULL ||
execsp.ctorsp == NULL ||
execsp.mainsp == NULL ||
execsp.dtorsp == NULL)
struct execsp execsp;