9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "david presotto" <presotto@plan9.bell-labs.com>
To: <9fans@cse.psu.edu>
Subject: Re: [9fans] libc/strcmp bug?
Date: Sat, 10 Aug 2002 19:43:07 -0400	[thread overview]
Message-ID: <002c01c240c7$ae543920$ee19ff87@bl.belllabs.com> (raw)
In-Reply-To: <f0cf514486f2161d7c2d87f0ee5806b6@centurytel.net>

That's a bug in marshal.
----- Original Message -----
From: "Skip Tavakkolian" <fst@centurytel.net>
To: <9fans@cse.psu.edu>
Sent: Friday, August 09, 2002 8:35 PM
Subject: [9fans] libc/strcmp bug?


> I believe there is a bug in /sys/src/libc/port/strcmp.c, because it
> does not check for null pointers getting passed in before
> dereferencing them.  I ran into it when attempting to Post some mail;
> 'marshal' dies with this message:
>
> marshal 2014: suicide: sys: trap: fault read addr=0x0 pc=0x00006feb
>
> Inspection points to the strcmp:
>
> term% acid 2014
> /proc/2014/text:386 plan 9 executable
>
> /sys/lib/acid/port
> /sys/lib/acid/386
> acid: stk()
> At pc:0x00006feb:strcmp+0xe /sys/src/libc/port/strcmp.c:10
> strcmp(s1=0x00000000,s2=0x00013c5a) /sys/src/libc/port/strcmp.c:5
> called from islikeatty+0x32 /sys/src/cmd/upas/common/libsys.c:709
> islikeatty(fd=0x00000000) /sys/src/cmd/upas/common/libsys.c:701
> called from holdon+0xf /sys/src/cmd/upas/common/libsys.c:719
> holdon() /sys/src/cmd/upas/common/libsys.c:715
> called from main+0x856 /sys/src/cmd/upas/marshal/marshal.c:271
> main(argv=0x7fffefec,argc=0x00000000)
/sys/src/cmd/upas/marshal/marshal.c:162
> called from _main+0x31 /sys/src/libc/386/main9.s:16
> acid:
>
> I'm not sure why the first arg to strcmp was null.  I'm still
investigating.
>
>



  parent reply	other threads:[~2002-08-10 23:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-10  0:35 Skip Tavakkolian
2002-08-10  4:46 ` Alexander Viro
2002-08-10  5:44   ` arisawa
2002-08-10 23:43 ` david presotto [this message]
2002-08-10  3:23 Skip Tavakkolian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='002c01c240c7$ae543920$ee19ff87@bl.belllabs.com' \
    --to=presotto@plan9.bell-labs.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).