mariadb/regex
Dmitry Shulga 378091e434 Fixed bug#58026 - massive recursion and crash in regular expression
handling.

The problem was that parsing of nested regular expression involved
recursive calls. Such recursion didn't take into account the amount of
available stack space, which ended up leading to stack overflow crashes.

mysql-test/t/not_embedded_server.test:
  Added test for bug#58026.
regex/my_regex.h:
  added pointer to function as last argument of my_regex_init() for check
  enough memory in stack.
regex/regcomp.c:
  p_ere() was modified: added call to function for check enough memory
  in stack. Function for check available stack space specified by
  global variable my_regex_enough_mem_in_stack. This variable set to
  NULL for embedded mysqld and to a pointer to function
  check_enough_stack_size otherwise.
regex/reginit.c:
  my_regex_init was modified: pass a pointer to a function for check
  enough memory in stack space. Reset this pointer to NULL in my_regex_end.
sql/mysqld.cc:
  Added function check_enough_stack_size() for check enough memory in stack.
  Passed this function as second argument to my_regex_init. For embedded 
  mysqld passed NULL as second argument.
2011-02-04 10:47:46 +06:00
..
.cvsignore
cclass.h regexp worked only with the default character set. 2003-09-24 13:57:26 +05:00
CHANGES
CMakeLists.txt BUG#47850: too many files built in regex/ 2009-10-09 09:53:29 +02:00
cname.h
COPYRIGHT
debug.c Many files: 2005-09-29 02:08:24 +02:00
debug.ih Many files: 2005-09-29 02:08:24 +02:00
engine.c Bug#45288: pb2 returns a lot of compilation warnings on linux 2010-07-20 15:07:36 -03:00
engine.ih Many files: 2005-09-29 02:08:24 +02:00
main.c Bug#45288: pb2 returns a lot of compilation warnings 2010-10-19 20:36:59 -02:00
main.ih Many files: 2005-09-29 02:08:24 +02:00
make-ccc
Makefile.am my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
my_regex.h Fixed bug#58026 - massive recursion and crash in regular expression 2011-02-04 10:47:46 +06:00
README
regcomp.c Fixed bug#58026 - massive recursion and crash in regular expression 2011-02-04 10:47:46 +06:00
regcomp.ih Review of all code pushed since last review 2004-10-20 01:28:42 +03:00
regerror.c Many files: 2005-09-29 02:08:24 +02:00
regerror.ih Many files: 2005-09-29 02:08:24 +02:00
regex.3
regex.7
regex2.h
regexec.c Bug#58057: 5.1 libmysql/libmysql.c unused variable/compile failure 2010-11-10 19:14:47 -02:00
regexp.c
regfree.c Many files: 2005-09-29 02:08:24 +02:00
reginit.c Fixed bug#58026 - massive recursion and crash in regular expression 2011-02-04 10:47:46 +06:00
split.c
tests
utils.h
WHATSNEW

alpha3.4 release.
Thu Mar 17 23:17:18 EST 1994
henry@zoo.toronto.edu

See WHATSNEW for change listing.

installation notes:
--------
Read the comments at the beginning of Makefile before running.

Utils.h contains some things that just might have to be modified on
some systems, as well as a nested include (ugh) of <assert.h>.

The "fake" directory contains quick-and-dirty fakes for some header
files and routines that old systems may not have.  Note also that
-DUSEBCOPY will make utils.h substitute bcopy() for memmove().

After that, "make r" will build regcomp.o, regexec.o, regfree.o,
and regerror.o (the actual routines), bundle them together into a test
program, and run regression tests on them.  No output is good output.

"make lib" builds just the .o files for the actual routines (when
you're happy with testing and have adjusted CFLAGS for production),
and puts them together into libregex.a.  You can pick up either the
library or *.o ("make lib" makes sure there are no other .o files left
around to confuse things).

Main.c, debug.c, split.c are used for regression testing but are not part
of the RE routines themselves.

Regex.h goes in /usr/include.  All other .h files are internal only.
--------