Package: pscan
Version: 1.2-8
Severity: normal
Tags: patch

I have a 35700 line, 215751 byte machine-generated source file that kills 
pscan. There are other killer generated files, too, but the first one pscan 
hits is pretty representative. There's nothing very interesting about the file, 
other than that it's rather large.

Experiment shows that 4 is the minimum integer multiple of the current 
fixed-size limit that works for our codebase. I've attached the obvious stupid 
patch.

If you'd be interested in switching to C++, I'll happily write a patch that 
switches to std::deque and avoids this kind of thing. (It would be even easier 
to remove the fixed limit on the number of user-supplied functions.) Life's too 
short to be reimplementing basic variable-size collections in C, though :-(

--- pscan.c.orig        2007-08-08 17:39:20.000000000 -0700
+++ pscan.c     2007-08-08 17:45:19.000000000 -0700
@@ -46,7 +46,7 @@
 static int warnings = FALSE;
 static char *filename;
 
-#define FSM_MAX_STACK 8192
+#define FSM_MAX_STACK 32768
 static parser_state_t fsm_stack[FSM_MAX_STACK];
 static int stack_index = 0;
 parser_state_t *state = NULL;


-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (500, 'testing'), (500, 'stable'), (50, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-3-686
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_US.UTF-8)

Versions of packages pscan depends on:
ii  libc6                        2.3.6.ds1-8 GNU C Library: Shared libraries

pscan recommends no packages.

-- no debconf information


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

Reply via email to