*BSD News Article 9792


Return to BSD News archive

Received: by minnie.vk1xwt.ampr.org with NNTP
	id AA6511 ; Sun, 10 Jan 93 11:19:09 EST
Path: sserve!manuel.anu.edu.au!munnari.oz.au!sgiblab!sdd.hp.com!spool.mu.edu!agate!doc.ic.ac.uk!uknet!cf-cm!myrddin.isl.cf.ac.uk!paul
From: paul@isl.cf.ac.uk (Paul Richards)
Newsgroups: comp.unix.bsd
Subject: gnu mathlib pow.s bug FIX
Message-ID: <1993Jan12.214029.26276@cm.cf.ac.uk>
Date: 12 Jan 93 21:40:28 GMT
Sender: news@cm.cf.ac.uk (Network News System)
Organization: Intelligent Systems Lab, ELSYM, Universiity of Wales, College of 
              Cardiff.
Lines: 32

I got around to looking at the pow.s bug I found in the mathlib library
today. The fix is included below. If you use the mathlib then you need
to apply this patch and recompile your apps. 

The bug was that pow() was corrupting temporary values held in the
registers ebx,esi and edi by restoring their saved values from the
wrong place on the stack.

*** pow.s.orig	Tue Jan 12 21:16:40 1993
--- pow.s	Tue Jan 12 21:20:05 1993
***************
*** 155,161 ****
  	fchs
  /*/NO_APP*/
  .L1:
! 	leal -28(%ebp),%esp
  	popl %ebx
  	popl %esi
  	popl %edi
--- 155,161 ----
  	fchs
  /*/NO_APP*/
  .L1:
! 	leal -40(%ebp),%esp
  	popl %ebx
  	popl %esi
  	popl %edi
-- 
  Paul Richards, University of Wales, College Cardiff

  JANET:paul@uk.ac.cf.isl	Internet:paul@isl.cf.ac.uk
  UUCP: paul@cf-isl.UUCP or ...!uunet!mcsun!uknet!cf!isl!paul