NetBSD Problem Report #8283

Received: (qmail 20567 invoked from network); 27 Aug 1999 17:18:40 -0000
Message-Id: <199908271718.TAA03342@sockdev.uni-c.dk>
Date: Fri, 27 Aug 1999 19:18:36 +0200 (CEST)
From: erik@mediator.uni-c.dk
Reply-To: erik@mediator.uni-c.dk
To: gnats-bugs@gnats.netbsd.org
Subject: mips libc missing _isnan/_isinf
X-Send-Pr-Version: 3.95

>Number:         8283
>Category:       lib
>Synopsis:       mips libc missing _isnan/_isinf
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    lib-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Aug 27 10:20:00 +0000 1999
>Closed-Date:    Tue Sep 07 07:05:16 +0000 1999
>Last-Modified:  Sun Dec 17 13:25:34 +0000 2000
>Originator:     Erik Bertelsen
>Release:        NetBSD-current 26 Aug 1999
>Organization:

>Environment:

System: NetBSD sockdev.uni-c.dk 1.4K NetBSD 1.4K (SOCKDEV) #83: Thu Aug 26 18:46:47 CEST 1999 erik@sockdev.uni-c.dk:/usr/src/sys/arch/pmax/compile/SOCKDEV pmax


>Description:
	On my pmax, libc was rebuilt based on 25 August sources. After sup'ing sources
	on 26 Aug, things were bad:

	* perl would coredump on each invocation
	* compilation of libc aborted with signal 11 when compiling strtod.c
	* compilation of several (most?) libm sources would die with signal 11
	* "fixing" libc by touch'ing strtod.s?o and installing it would cause
	  bin/cat to not link, but this time with a readable message, i.e. one of _isinf/_isnan
	  not being defined (I don't recall which of them).

	This lead me to look at libc/arch/mips/gen/isinf.S and propose the following patch.

	Furthermore this file contains the following lines:


	#ifdef WEAK_ALIAS
	#define isnan	_isnan	/* XXX */
	#define isinf	_isinf	/* XXX */
	WEAK_ALIAS(isnan,_isnan);
	WEAK_ALIAS(isinf,_isinf);
	#endif

	These lines look suspicious and should be corrected, possibly by eradication.

	I suspect that the recent change to sys/cdefs_elf.h about allowing weak aliases
	was the provoking event.


>How-To-Repeat:

>Fix:
Index: isinf.S
===================================================================
RCS file: /sw/cvs-base/src/lib/libc/arch/mips/gen/isinf.S,v
retrieving revision 1.1.1.2
diff -c -r1.1.1.2 isinf.S
*** isinf.S	1998/10/14 16:02:31	1.1.1.2
--- isinf.S	1999/08/27 14:42:58
***************
*** 65,70 ****
--- 65,71 ----
   * Return true if x is a NAN.
   */
  LEAF(isnan)
+ XLEAF(_isnan)
  	mfc1	v1, $f13		# get MSW of x
  	mfc1	t3, $f12		# get LSW of x
  	sll	t1, v1, 1		# get x exponent
***************
*** 90,95 ****
--- 91,97 ----
   * Return true if x is infinity.
   */
  LEAF(isinf)
+ XLEAF(_isinf)
  	mfc1	v1, $f13		# get MSW of x
  	mfc1	t3, $f12		# get LSW of x
  	sll	t1, v1, 1		# get x exponent


	regards
	Erik Bertelsen
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: simonb 
State-Changed-When: Tue Aug 31 07:02:02 PDT 1999 
State-Changed-Why:  

With the latest changes by Charles Hannum, isinf and isnan are 
handled by C code, and the weak aliases shouldn't be a problem. 
Is this OK now? 

Simon. 
State-Changed-From-To: feedback->closed 
State-Changed-By: simonb 
State-Changed-When: Tue Sep 7 00:05:16 PDT 1999 
State-Changed-Why:  
Thanks for the feedback! 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.