Your message dated Tue, 12 Apr 2005 02:47:03 -0400
with message-id <[EMAIL PROTECTED]>
and subject line Bug#276677: fixed in jbofihe 0.38-4
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 15 Oct 2004 16:22:37 +0000
>From [EMAIL PROTECTED] Fri Oct 15 09:22:37 2004
Return-path: <[EMAIL PROTECTED]>
Received: from adsl-209-204-169-32.sonic.net (luther.lothar.com) 
[209.204.169.32] 
        by spohr.debian.org with smtp (Exim 3.35 1 (Debian))
        id 1CIUqj-0006vZ-00; Fri, 15 Oct 2004 09:22:37 -0700
Received: (qmail 10761 invoked from network); 15 Oct 2004 16:22:32 -0000
Received: from unknown (HELO localhost) (127.0.0.1)
  by localhost.local with SMTP; 15 Oct 2004 16:22:32 -0000
Date: Fri, 15 Oct 2004 09:22:32 -0700 (PDT)
Message-Id: <[EMAIL PROTECTED]>
From: [EMAIL PROTECTED]
To: Debian Bug Tracking System <[EMAIL PROTECTED]>
Subject: jbofihe: cmafihe crashes with mmap error
X-Debbugs-CC: [EMAIL PROTECTED]
X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Multipart/Mixed;
 boundary="--Next_Part(Fri_Oct_15_09_22_32_2004_413)--"
Content-Transfer-Encoding: 7bit
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-9.4 required=4.0 tests=BAYES_00,HAS_PACKAGE,
        NO_REAL_NAME,X_DEBBUGS_CC autolearn=ham 
        version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 

----Next_Part(Fri_Oct_15_09_22_32_2004_413)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Package: jbofihe
Version: 0.38-3.1
Severity: important
Tags: patch

At some point in the recent past, the 'cmafihe' program included in this
package started crashing every time. The error message is somewhat cryptic:

 % echo "mi klama le zarci" |cmafihe   
 Could not mmap the dictionary data
 : Invalid argument

It turns out this is spurious: the code is testing the return value of the
mmap call for errors with "rc < 0", whereas the correct check is "rc == -1".
mmap() returns a pointer, or a -1. The pointer may appear to be negative if
it is in, say, the stack region, but that does not make it an error.

I don't know how long this bug has been around.. it could be that my recent
move to a 2.6.x kernel triggered it, or some change in libc. I seem to
remember that cmafihe used to work a few months ago. 'jbofihe', the main
program in this package, seems to be unaffected by the bug.

I've attached a patch to fix this problem for the two uses of mmap() in the
source code. I took a quick peek at the upstream development branch: it
appears that the two uses have been consolidated into a single one, but it
still uses the wrong test. Therefore this change still needs to be pushed
upstream.

My patch also changes the 'uncom.l' scanner to use an '%option noyywrap'
instead of the (fragile) yywrap macro, making it possible to build this with
a modern version of flex. I compiled it and ran some brief tests on a system
with flex-2.5.31 . I think this should remove the need for the 'flex-old'
build-dependency.

cheers,
 -Brian


-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.9-rc2
Locale: LANG=C, LC_CTYPE=C

Versions of packages jbofihe depends on:
ii  libc6                       2.3.2.ds1-17 GNU C Library: Shared libraries an

-- no debconf information

----Next_Part(Fri_Oct_15_09_22_32_2004_413)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="jbofihe.diffs"

--- jbofihe-0.38.orig/cm_translate.c    2001-09-15 18:10:37.000000000 -0400
+++ jbofihe-0.38/cm_translate.c 2004-10-15 12:03:20.000000000 -0400
@@ -117,8 +117,8 @@
     mmap_base = mmap(NULL, sb.st_size, PROT_READ, MAP_SHARED, fileno(in), 0);
     result = (int) mmap_base;
 
-    if (result < 0) {
-      perror("Could not mmap the dictionary data\n");
+    if (result == -1) {
+      perror("Could not mmap the dictionary data");
       exit(1);
     }
 
--- jbofihe-0.38.orig/dictaccs.c        2001-09-15 18:10:38.000000000 -0400
+++ jbofihe-0.38/dictaccs.c     2004-10-15 12:03:39.000000000 -0400
@@ -131,8 +131,8 @@
     mmap_base = mmap(NULL, sb.st_size, PROT_READ, MAP_SHARED, fileno(in), 0);
     result = (int) mmap_base;
 
-    if (result < 0) {
-      perror("Could not mmap the dictionary data\n");
+    if (result == -1) {
+      perror("Could not mmap the dictionary data");
       exit(1);
     }
 
--- jbofihe-0.38.orig/uncom.l   2001-09-15 18:10:43.000000000 -0400
+++ jbofihe-0.38/uncom.l        2004-10-15 11:53:43.000000000 -0400
@@ -30,13 +30,10 @@
  *********************************************************************/
 
 %{
-#ifndef yywrap
-#define yywrap() 1
-#endif
-
 static int depth = 0;
 %}
 
+%option noyywrap
 %x COMMENT
 
 %%

----Next_Part(Fri_Oct_15_09_22_32_2004_413)----

---------------------------------------
Received: (at 276677-close) by bugs.debian.org; 12 Apr 2005 06:53:12 +0000
>From [EMAIL PROTECTED] Mon Apr 11 23:53:12 2005
Return-path: <[EMAIL PROTECTED]>
Received: from newraff.debian.org [208.185.25.31] (mail)
        by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
        id 1DLFGq-0006gB-00; Mon, 11 Apr 2005 23:53:12 -0700
Received: from katie by newraff.debian.org with local (Exim 3.35 1 (Debian))
        id 1DLFAt-00083P-00; Tue, 12 Apr 2005 02:47:03 -0400
From: Theodore Reed <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
X-Katie: $Revision: 1.55 $
Subject: Bug#276677: fixed in jbofihe 0.38-4
Message-Id: <[EMAIL PROTECTED]>
Sender: Archive Administrator <[EMAIL PROTECTED]>
Date: Tue, 12 Apr 2005 02:47:03 -0400
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
        autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 
X-CrossAssassin-Score: 3

Source: jbofihe
Source-Version: 0.38-4

We believe that the bug you reported is fixed in the latest version of
jbofihe, which is due to be installed in the Debian FTP archive:

jbofihe_0.38-4.diff.gz
  to pool/main/j/jbofihe/jbofihe_0.38-4.diff.gz
jbofihe_0.38-4.dsc
  to pool/main/j/jbofihe/jbofihe_0.38-4.dsc
jbofihe_0.38-4_i386.deb
  to pool/main/j/jbofihe/jbofihe_0.38-4_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Theodore Reed <[EMAIL PROTECTED]> (supplier of updated jbofihe package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Mon, 11 Apr 2005 20:06:21 -0700
Source: jbofihe
Binary: jbofihe
Architecture: source i386
Version: 0.38-4
Distribution: unstable
Urgency: low
Maintainer: Theodore Reed <[EMAIL PROTECTED]>
Changed-By: Theodore Reed <[EMAIL PROTECTED]>
Description: 
 jbofihe    - A parser for the lojban language
Closes: 189911 221307 258923 276677
Changes: 
 jbofihe (0.38-4) unstable; urgency=low
 .
   * New maintainer. (closes: #221307)
   * Change build depends to flex. Unsure why flex-old was needed.
   * Similarly with bison. Not sure why bison-1.35 was needed.
   * Apply mmap patch. (closes: #276677)
   * Apply FTBFS fix patch. (closes: #258923, 189911)
Files: 
 ebe40ef659d9bf0659b22d5a533e8b33 597 misc optional jbofihe_0.38-4.dsc
 16c62d524fe5bf783c4a7081a2d4b62c 3897 misc optional jbofihe_0.38-4.diff.gz
 1e30a5dccd6edf94aad5e022f2009a69 621182 misc optional jbofihe_0.38-4_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFCW2voXrnnKiKKOuQRAjDSAJ0fulvepFA3DjJDvQlZ4IBcInIFeACghjW5
oe+NmB6hnF0pn1Ad4DL6kIs=
=EEIz
-----END PGP SIGNATURE-----


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to