From andre.albsmeier@mchp.siemens.de  Sun Apr  2 23:57:31 2000
Return-Path: <andre.albsmeier@mchp.siemens.de>
Received: from goliath.siemens.de (goliath.siemens.de [194.138.37.131])
	by hub.freebsd.org (Postfix) with ESMTP id 5BB6037BDA0
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  2 Apr 2000 23:57:26 -0700 (PDT)
	(envelope-from andre.albsmeier@mchp.siemens.de)
Received: from mail2.siemens.de (mail2.siemens.de [139.25.208.11])
	by goliath.siemens.de (8.10.0/8.10.0) with ESMTP id e336vNt29198
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 3 Apr 2000 08:57:24 +0200 (MET DST)
Received: from curry.mchp.siemens.de (curry.mchp.siemens.de [139.25.42.7])
	by mail2.siemens.de (8.10.0/8.10.0) with ESMTP id e336vN326410
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 3 Apr 2000 08:57:23 +0200 (MET DST)
Received: (from daemon@localhost)
	by curry.mchp.siemens.de (8.9.3/8.9.3) id IAA07478
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 3 Apr 2000 08:57:23 +0200 (CEST)
Message-Id: <200004030657.IAA17316@internal>
Date: Mon, 3 Apr 2000 08:57:21 +0200 (CEST)
From: Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
To: FreeBSD-gnats-submit@freebsd.org
Subject: sh in free(): warning: junk pointer, too low to make sense.
X-Send-Pr-Version: 3.2

>Number:         17765
>Category:       bin
>Synopsis:       sh in free(): warning: junk pointer, too low to make sense.
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr  3 00:00:02 PDT 2000
>Closed-Date:    Thu Sep 7 08:51:55 MEST 2000
>Last-Modified:  Thu Sep 07 08:53:01 MEST 2000
>Originator:     Andre Albsmeier
>Release:        FreeBSD 3.4-STABLE i386
>Organization:
>Environment:

3.4-STABLE as of 2.4.2000

>Description:

There have been some recent changes to /bin/sh. I have observed
the above error message with a shell script that ran fine before.

>How-To-Repeat:

Until now, I observed the errorneous behaviour only with this special
shell script. I won't post it here since it is quite long and will
only run in my environment. However, if someone ist still interested
in it, please let me now and I will send it in private mail.

I have compiled sh with -g and ran the script within it and gdb:

root@bali:/people/andre/x>gdb ./sh
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-unknown-freebsd"...
(gdb) set args ./csf cu pr se ba
(gdb) run
Starting program: ./sh ./csf cu pr se ba

checking hosts:....
unreachable: none
targets: 4


Files in /server/FreeBSD/conf/3/curry:
-----------------------------------------------------------------------
sh in free(): warning: junk pointer, too low to make sense.

Program received signal SIGSEGV, Segmentation fault.
popstackmark (mark=0xbfbfd6e0) at /src/src-3/bin/sh/memalloc.c:191
191                     stackp = sp->prev;
(gdb) where
#0  popstackmark (mark=0xbfbfd6e0) at /src/src-3/bin/sh/memalloc.c:191
#1  0x804b069 in evalfor (n=0x80ac948) at /src/src-3/bin/sh/eval.c:364
#2  0x804ad76 in evaltree (n=0x80ac948, flags=0)
    at /src/src-3/bin/sh/eval.c:251
#3  0x804ad54 in evaltree (n=0x80acd64, flags=0)
    at /src/src-3/bin/sh/eval.c:241
#4  0x804ac2b in evaltree (n=0x80acdc4, flags=0)
    at /src/src-3/bin/sh/eval.c:203
#5  0x804ad54 in evaltree (n=0x80ac558, flags=0)
    at /src/src-3/bin/sh/eval.c:241
#6  0x804ad54 in evaltree (n=0x80acdd4, flags=0)
    at /src/src-3/bin/sh/eval.c:241
#7  0x804ac2b in evaltree (n=0x80ace50, flags=0)
    at /src/src-3/bin/sh/eval.c:203
#8  0x804ac2b in evaltree (n=0x80acf28, flags=0)
    at /src/src-3/bin/sh/eval.c:203
#9  0x804ac2b in evaltree (n=0x80ae760, flags=0)
    at /src/src-3/bin/sh/eval.c:203
#10 0x804ac2b in evaltree (n=0x80ae7c0, flags=0)
    at /src/src-3/bin/sh/eval.c:203
#11 0x804ac2b in evaltree (n=0x80ae824, flags=0)
    at /src/src-3/bin/sh/eval.c:203
#12 0x804ac2b in evaltree (n=0x80ae8fc, flags=0)
    at /src/src-3/bin/sh/eval.c:203
#13 0x804ac2b in evaltree (n=0x80af128, flags=0)
    at /src/src-3/bin/sh/eval.c:203
#14 0x804ac2b in evaltree (n=0x80af188, flags=0)
    at /src/src-3/bin/sh/eval.c:203
#15 0x804afe2 in evalfor (n=0x80a55ec) at /src/src-3/bin/sh/eval.c:351
#16 0x804ad76 in evaltree (n=0x80a55ec, flags=0)
    at /src/src-3/bin/sh/eval.c:251
#17 0x805266b in cmdloop (top=1) at /src/src-3/bin/sh/main.c:254
#18 0x8052583 in main (argc=6, argv=0xbfbfd904) at /src/src-3/bin/sh/main.c:203
#19 0x80480ed in _start ()


>Fix:
	
Unknown. If you want me to test something or have some fix, tell me.

>Release-Note:
>Audit-Trail:

From: Martin Cracauer <cracauer@cons.org>
To: Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: bin/17765: sh in free(): warning: junk pointer, too low to make sense.
Date: Mon, 3 Apr 2000 09:33:43 +0200

 In <200004030657.IAA17316@internal>, Andre Albsmeier wrote: 
 > There have been some recent changes to /bin/sh. I have observed
 > the above error message with a shell script that ran fine before.
 > 
 > >How-To-Repeat:
 > 
 > Until now, I observed the errorneous behaviour only with this special
 > shell script. I won't post it here since it is quite long and will
 > only run in my environment. However, if someone ist still interested
 > in it, please let me now and I will send it in private mail.
 
 Please send me a copy.
 
 Thanks
 	Martin
 -- 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 Martin Cracauer <cracauer@cons.org> http://www.cons.org/cracauer/
   Tel.: (private) +4940 5221829 Fax.: (private) +4940 5228536
 
State-Changed-From-To: open->closed 
State-Changed-By: cracauer 
State-Changed-When: Thu Sep 7 08:51:55 MEST 2000 
State-Changed-Why:  
Author says it is fixed in 
20000907070059.A80754@curry.mchp.siemens.de 

http://www.freebsd.org/cgi/query-pr.cgi?pr=17765 
>Unformatted:
