NetBSD Problem Report #48755

From  Fri Apr 18 12:04:18 2014
Return-Path: <>
Received: from ( [])
	(using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "", Issuer "Postmaster" (verified OK))
	by (Postfix) with ESMTPS id B551DA581D
	for <>; Fri, 18 Apr 2014 12:04:18 +0000 (UTC)
Message-Id: <>
Date: Fri, 18 Apr 2014 12:04:17 +0000 (UTC)
Subject: hppa /bin/sh invalid instructions
X-Send-Pr-Version: www-1.0

>Number:         48755
>Category:       port-hppa
>Synopsis:       hppa /bin/sh invalid instructions
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-hppa-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Apr 18 12:05:00 +0000 2014
>Closed-Date:    Fri Apr 18 18:33:23 +0000 2014
>Last-Modified:  Fri Apr 18 18:35:00 +0000 2014
>Originator:     Martin Husemann
>Release:        6.99.40
The NetBSD Foundation, Inc.
NetBSD 6.99.40 NetBSD 6.99.40 (GENERIC) #1: Fri Apr 18 10:20:49 CEST 2014 hppa

See below
[/tmp] martin@moondance > send-pr
Illegal instruction(core dumped)
[/tmp] martin@moondance > gdb /bin/sh sh.core 
GNU gdb (GDB) 7.6.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "hppa--netbsd".
For bug reporting instructions, please see:
Reading symbols from /bin/sh...(no debugging symbols found)...done.
[New process 1]

warning: Can't read pathname for load map: Input/output error.
Core was generated by `sh'.
Program terminated with signal 4, Illegal instruction.
#0  0x00024d00 in readtoken1 ()
(gdb) x/16i $pc-12
   0x24cf4 <readtoken1+248>:    cmpiclr,< 3,ret0,r0
   0x24cf8 <readtoken1+252>:    b,l,n 0x24d8c <readtoken1+400>,r0
   0x24cfc <readtoken1+256>:    ldw -74(sp),ret0
=> 0x24d00 <readtoken1+260>:    ldb ret0(r3),ret0
   0x24d04 <readtoken1+264>:    extrw,s ret0,31,8,ret0
   0x24d08 <readtoken1+268>:    cmpib,>>=,n b,ret0,0x24db0 <readtoken1+436>
   0x24d0c <readtoken1+272>:    ldo -90(sp),ret0
   0x24d10 <readtoken1+276>:    ldw 0(ret0),r19



From: Martin Husemann <>
Subject: Re: port-hppa/48755: hppa /bin/sh invalid instructions
Date: Fri, 18 Apr 2014 20:20:59 +0200

 Some printf instrumentation shows MDP_OLDSPACE being set in the processes
 p->p_md.md_flags - probably because my login shell is still an old
 binary and that flag does not get cleared on exec properly.

 Shouldn't setregs just grow an else part and clear it?


State-Changed-From-To: open->closed
State-Changed-When: Fri, 18 Apr 2014 18:33:23 +0000

From: "Martin Husemann" <>
Subject: PR/48755 CVS commit: src/sys/arch/hppa/hppa
Date: Fri, 18 Apr 2014 18:32:00 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Fri Apr 18 18:32:00 UTC 2014

 Modified Files:
 	src/sys/arch/hppa/hppa: machdep.c

 Log Message:
 Explicitly clear p_md.md_flags for newer binaries. Fixes PR port-hppa/48755.
 OK: skrll

 To generate a diff of this commit:
 cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hppa/hppa/machdep.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.


NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD:,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.