I have Gentoo compiled completely 64-bit on sparc including userspace. When I run screen, it crashes; I debugged it with the following result - when screen is trying to create UTMP record, it fills into 'struct utmp' current time using (void)time((time_t *)&u->ut_time) call. Unfortunatelly, ut_time is 32-bit due to __WORDSIZE_COMPAT32, but time_t is 64-bit. Calling time() results in SIGBUG. It could probably affect other 64-bit platforms too. The proposed patch is: --- utmp.c.orig 2004-11-14 23:15:28.000000000 +0100 +++ utmp.c 2004-11-14 23:15:39.000000000 +0100 @@ -618,7 +618,7 @@ #endif /* sgi */ strncpy(u->ut_line, line, sizeof(u->ut_line)); u->ut_pid = pid; - (void)time((time_t *)&u->ut_time); + u->ut_time = time(NULL); } static slot_t Reproducible: Always Steps to Reproduce: 1.run screen Actual Results: It crashed. Expected Results: It should not crash :-). See details.
Created attachment 43954 [details, diff] Proposed patch.
We only support 32bit userland...
OKay, I agree with supporting only 32-bit userland on sparc, but the bug may cause problems on other 64-bit platforms too. Especially on big endians (like ppc).
Passing this to screen's maintainer
Added to app-misc/screen-4.0.2-r3