Re: upgrade 6-STABLE to -CURRENT on sparc64 renders box unusable

From: Michiel Boland <michiel_at_boland.org>
Date: Tue, 10 Jul 2007 22:41:08 +0200 (MEST)
Well, in fact I did manage to debug this further. :)

The problem is that on sparc64 and -CURRENT, every executable segfaults in

  _rtld
   init_rtld
    relocate_objects
     reloc_non_plt
      mmap
       __getosreldate

It appears that __getosreldate was added five days ago, which may explain 
why the breakage on sparc64 hasn't been reported yet. (I am ccing peter_at_ 
since he committed this.)

If I apply the following patch, then rebuild libc, things are more or less 
ok again. Of course this patch is very suboptimal, I am just trying to 
point out where the problem is.

--- __getosreldate.c.orig	2007-07-10 22:29:02.000000000 +0200
+++ __getosreldate.c	2007-07-10 22:28:20.000000000 +0200
_at__at_ -42,13 +42,10 _at__at_
  int
  __getosreldate(void)
  {
-	static int osreldate;
+	int osreldate;
  	size_t len;
  	int oid[2];
  	int error, osrel;
-
-	if (osreldate != 0)
-		return (osreldate);

  	oid[0] = CTL_KERN;
  	oid[1] = KERN_OSRELDATE;
Received on Tue Jul 10 2007 - 18:41:09 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:14 UTC