Your message dated Fri, 26 May 2006 16:32:14 -0700
with message-id <[EMAIL PROTECTED]>
and subject line Bug#276051: fixed in nvi 1.79-23
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)

--- Begin Message ---
Package: nvi
Version: 1.79-21

regexec.c breaks in some cases on 64bit boxen.  More accurately, it
sometimes happens to work on these.  The reason is that author had
very odd idea of the way cpp works:

/* macros for manipulating states, small version */
#define states  int
#define states1 states          /* for later use in regexec() decision */
...
/* now undo things */
#undef  states
...
/* macros for manipulating states, large version */
#define states  char *
...
        if (g->nstates <= CHAR_BIT*sizeof(states1) && !(eflags&REG_LARGE))
                return(smatcher(g, (char *)string, nmatch, pmatch, eflags));
        else
                return(lmatcher(g, (char *)string, nmatch, pmatch, eflags));


Note that states1 there will expand to char *, not to int as intended.
As the result, on boxen that have char * bigger than int we can end
up calling the wrong function - one that expects a bitmap with g->nstates
elements to fit into int.  That breaks in all sorts of platform-specific
ways, of course.

E.g. on alpha try the following:
vi
ixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
<ESC>:%s/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx//
and watch what it leaves.  On other platforms breakage might differ -
we are in nasal demon land, since we end up doing left shifts on signed
int by more than the width of int...

Fix is trivial:

diff -urN nvi-1.79.old/regex/regexec.c nvi-1.79/regex/regexec.c
--- nvi-1.79.old/regex/regexec.c        1996-07-09 19:05:53.000000000 -0400
+++ nvi-1.79/regex/regexec.c    2004-10-11 15:01:17.722795992 -0400
@@ -63,7 +63,7 @@
 
 /* macros for manipulating states, small version */
 #define        states  int
-#define        states1 states          /* for later use in regexec() decision 
*/
+typedef        states states1;         /* for later use in regexec() decision 
*/
 #define        CLEAR(v)        ((v) = 0)
 #define        SET0(v, n)      ((v) &= ~(1 << (n)))
 #define        SET1(v, n)      ((v) |= 1 << (n))


--- End Message ---
--- Begin Message ---
Source: nvi
Source-Version: 1.79-23

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

nvi_1.79-23.diff.gz
  to pool/main/n/nvi/nvi_1.79-23.diff.gz
nvi_1.79-23.dsc
  to pool/main/n/nvi/nvi_1.79-23.dsc
nvi_1.79-23_i386.deb
  to pool/main/n/nvi/nvi_1.79-23_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.
Steve Greenland <[EMAIL PROTECTED]> (supplier of updated nvi 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: Fri, 26 May 2006 18:06:04 -0500
Source: nvi
Binary: nvi
Architecture: source i386
Version: 1.79-23
Distribution: unstable
Urgency: low
Maintainer: Steve Greenland <[EMAIL PROTECTED]>
Changed-By: Steve Greenland <[EMAIL PROTECTED]>
Description: 
 nvi        - 4.4BSD re-implementation of vi
Closes: 193498 195914 220049 276051 294767 340742 355639 360168 367933
Changes: 
 nvi (1.79-23) unstable; urgency=low
 .
   * Update config.sub and config.guess during build (closes: #195914)
   * Adjust priorities so that vim-tiny replaces nvi as default minimal vi
     without changing vi alternative on upgrade. (closes: #367933,#360168)
   * Fix invocation of su in init.d/nvi to use quotes (closes: #355639)
   * Fix crash due to buggy '(' movement, patch from Tommy Pettersson
     (closes: #193498)
   * Always use -f for rm in init.d/nvi to avoid prompting/hangs during
     boot (closes: #220049)
   * More 64bit regex breakage fixes from Al Viro (closes: #276051)
   * Remove spurious space from init.d/nvi output (closes: #294767)
   * In init.d/nvi output, distinguish between finding sessions to recover
     and otherwise (closes: #340742)
   * update debhelper compatibility to v5.
Files: 
 2712b816124aa00e5e12f495f5139850 570 editors optional nvi_1.79-23.dsc
 21391732ab33cbf14fcd7918bace1c86 13503 editors optional nvi_1.79-23.diff.gz
 06c46b9d6f4e6ce959f8692818f9dd21 293570 editors optional nvi_1.79-23_i386.deb

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

iD8DBQFEd4uhdiZsUPux21MRAmQWAJ93VJUP7av0CsB5G2LS4+tXXatE7gCfXj6n
XAk0J57XvhYPYQPwuNYqBLE=
=Pyze
-----END PGP SIGNATURE-----


--- End Message ---

Reply via email to