[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
fix for csplit core dump on Solaris 10, Sun Studio 10, 64-bit sparc
From: |
Paul Eggert |
Subject: |
fix for csplit core dump on Solaris 10, Sun Studio 10, 64-bit sparc |
Date: |
Thu, 10 Aug 2006 13:54:40 -0700 |
User-agent: |
Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux) |
I installed this:
2006-08-10 Paul Eggert <address@hidden>
* src/csplit.c (struct control): Remove fastmap member.
(extract_regexp): Allocate fastmap separately, since otherwise
it might move due to a realloc. This fixes a bug that led
to a core dump on 64-bit sparc Solaris 10 (Sun Studio 10).
--- src/csplit.c 9 Jul 2006 17:08:55 -0000 1.150
+++ src/csplit.c 10 Aug 2006 20:49:47 -0000
@@ -69,7 +69,6 @@ struct control
bool ignore; /* If true, produce no output (for regexp). */
bool regexpr; /* True if regular expression was used.
*/
struct re_pattern_buffer re_compiled; /* Compiled regular expression.
*/
- char fastmap[UCHAR_MAX + 1]; /* Fastmap for RE_COMPILED. */
};
/* Initial size of data area in buffers. */
@@ -1119,7 +1118,7 @@ extract_regexp (int argnum, bool ignore,
p->regexpr = true;
p->re_compiled.buffer = NULL;
p->re_compiled.allocated = 0;
- p->re_compiled.fastmap = p->fastmap;
+ p->re_compiled.fastmap = xmalloc (UCHAR_MAX + 1);
p->re_compiled.translate = NULL;
re_syntax_options =
RE_SYNTAX_POSIX_BASIC & ~RE_CONTEXT_INVALID_DUP & ~RE_NO_EMPTY_RANGES;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- fix for csplit core dump on Solaris 10, Sun Studio 10, 64-bit sparc,
Paul Eggert <=