Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Nov 2002 09:20:02 -0800 (PST)
From:      Cinek <cinekcvs@gmx.net>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: i386/45391: /usr/bin/cmp coredumps while reading a faulty CD-R
Message-ID:  <200211181720.gAIHK2cJ049263@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR i386/45391; it has been noted by GNATS.

From: Cinek <cinekcvs@gmx.net>
To: Bruce Evans <bde@zeta.org.au>
Cc: FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: i386/45391: /usr/bin/cmp coredumps while reading a faulty CD-R
Date: Mon, 18 Nov 2002 18:16:37 +0100

 On Monday 18 November 2002 12:21, Bruce Evans wrote:
 
 > I think there is a problem with mmap() on files with i/o errors in
 > them.  Pages should not be mapped if some part of them is unreadable,
 > and this should result in the application getting signals.  cmp makes
 > no attempt to handle signals.
 
 I see. I guess I cannot help much about it.
 
 > Not much, but you might be able to see that the fauilting instruction
 > is an ordinary memory access, which would indicate that the problem is
 > just unmapped memory.
 
 I have disassembled the part and indeed a memory access is causing
 the segfault. I will paste some lines here:
 
 Program terminated with signal 11, Segmentation fault.
  0x8048e17 in open ()
 
 0x8048e14 <open+1904>:  mov    0xfffffff8(%ebp),%edx
 0x8048e17 <open+1907>:  mov    (%edx),%dl
 0x8048e19 <open+1909>:  mov    %dl,0xffffffff(%ebp)
 0x8048e1c <open+1912>:  mov    0xfffffff4(%ebp),%eax
 0x8048e1f <open+1915>:  cmp    (%eax),%dl
 0x8048e21 <open+1917>:  je     0x8048eb7 <open+2067>
 0x8048e27 <open+1923>:  cmpl   $0x0,0x804a80c
 0x8048e2e <open+1930>:  je     0x8048e60 <open+1980>
 
 Martin
 
 

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200211181720.gAIHK2cJ049263>