This is the mail archive of the libc-alpha@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Sigaction fix for Sparclinux (2.0.x)


[Please cc me on any replies as I'm not reading this list]

Hi,

following the advice from Andreas Jaeger I repost my fix here.

Greetings,



				Christian

----- Forwarded message from Christian Meder <meder@isr.uni-stuttgart.de> -----

Resent-Date: Wed, 9 Jun 1999 08:50:53 -0400
Date: Wed, 9 Jun 1999 14:49:55 +0200
From: Christian Meder <meder@isr.uni-stuttgart.de>
To: Richard van Denzel <richardd@interaccess.nl>
Cc: bug-glibc@gnu.org
Subject: Re: glibc 2.1.1 installation error
X-Mailer: Mutt 0.95.3i
In-Reply-To: <375E4EFF.40EE01D9@interaccess.nl>; from Richard van Denzel on Wed, Jun 09, 1999 at 01:24:47PM +0200
Resent-Message-ID: <"qWelk2.0.rk.WCcNt"@mescaline.gnu.org>
Resent-From: bug-glibc@gnu.org
X-Mailing-List: <bug-glibc@gnu.org> archive/latest/1307
X-Loop: bug-glibc@gnu.org
Precedence: list
Resent-Bcc:
X-loop: meder@isr.uni-stuttgart.de
Resent-Sender: Christian Meder <chris@chris.isr.uni-stuttgart.de>
X-UIDL: 46bd7e80ce747389752e30a006342b1e

On Wed, Jun 09, 1999 at 01:24:47PM +0200, Richard van Denzel wrote:
> Dear Sir,
> 
> I'm trying to install glibc 2.1.1 on a Sparc 20 running RedHat 5.2
> (kernel 2.0.35).
> I'm using egcs 2.91.66 and make 3.77.
> 
> Compiling glibc went fine. When I did a make install I got the error
> message as stated in the attached file, about a wild result in a
> timezone.
> Could you give me clue to what is going wrong, or did I miss something?
> 
> /home/richardd/build-glibc/elf/ld-linux.so.2 --library-path /home/richardd/build-glibc:/home/richardd/build-glibc/math:/home/richardd/build-glibc/elf:/home/richardd/build-glibc/nss:/home/richardd/build-glibc/nis:/home/richardd/build-glibc/db2:/home/richardd/build-glibc/rt:/home/richardd/build-glibc/resolv:/home/richardd/build-glibc/linuxthreads /home/richardd/build-glibc/timezone/zic -d /usr/local/share/zoneinfo -L /dev/null -y ./yearistype australasia
> "australasia", line 83: Wild result from command execution (rule from "australasia", line 75)
> /home/richardd/build-glibc/timezone/zic: command was './yearistype 1990 even', result was -1
> make[2]: *** [/usr/local/share/zoneinfo/Australia/Adelaide] Error 1
> make[2]: Leaving directory `/home/richardd/glibc-2.1.1/timezone'
> make[1]: *** [timezone/subdir_install] Error 2
> make[1]: Leaving directory `/home/richardd/glibc-2.1.1'
> make: *** [install] Error 2

Hi,

sorry to jump in. I'm not a glibc developer so take this advice with a grain
of salt as it's not official. 

The problem looks vaguely familiar cause I hit it while compiling glibc
for the Debian slink distribution for Sparc which is based on glibc 2.0.105.

The problem will only show up on 2.0.x linux kernels which is probably the
reason no one has patched it yet.

Could you try the appended fix ?

Reasoning behind the fix:

* 2.2.x linux kernels use a sigaction syscall so they never reach the
relevant part of sparc32/sigaction.c

* sigaction calls on 2.0.x kernels with oact==NULL will always return -1 
even when the sigaction call was successfull; weird error messages like 
'Error: Success' are displayed

Could anybody from the glibc hackers verify that the patch isn't 
complete BS ?

--- glibc-2.1.1/sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c-orig  Wed Jun  9 13:5
1:39 1999
+++ glibc-2.1.1/sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c       Wed Jun  9 13:5
4:10 1999
@@ -118,13 +118,16 @@
     ret = r_sig;
   }
 
-  if (oact && ret >= 0)
+  if (ret >= 0)
     {
-      oact->sa_handler = k_osigact.k_sa_handler;
-      oact->sa_mask.__val[0] = k_osigact.sa_mask;
-      oact->sa_flags = k_osigact.sa_flags;
-      oact->sa_restorer = NULL;
-      return ret;
+      if (oact)
+        {
+          oact->sa_handler = k_osigact.k_sa_handler;
+          oact->sa_mask.__val[0] = k_osigact.sa_mask;
+          oact->sa_flags = k_osigact.sa_flags;
+          oact->sa_restorer = NULL;
+        }
+        return ret;
     }
 
   __set_errno (-ret);




----- End forwarded message -----

-- 
Christian Meder, email: meder@isr.uni-stuttgart.de

What's the railroad to me ?
I never go to see
Where it ends.
It fills a few hollows,
And makes banks for the swallows, 
It sets the sand a-blowing,
And the blackberries a-growing.
                      (Henry David Thoreau)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]