Commit 44c0545a authored by monty@donna.mysql.fi's avatar monty@donna.mysql.fi
Browse files

Added test case that crashed Innobase

parent 2ff0334c
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
#! /bin/sh
gmake -k clean || true 
/bin/rm -f */.deps/*.P config.cache

path=`dirname $0`
. "$path/SETUP.sh"
aclocal && autoheader && aclocal && automake && autoconf
(cd bdb/dist && sh s_all)
(cd innobase && aclocal && autoheader && aclocal && automake && autoconf)

extra_flags="$sparc_cflags -DHAVE_PURIFY -O2"
extra_configs="$sparc_configs --with-debug=full"
CFLAGS="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Wunused  -DHAVE_purify -O2" CXX=gcc CXXFLAGS="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wextern-inline -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti  -DHAVE_PURIFY -O2" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-debug=full

. "$path/FINISH.sh"
gmake -j 4
+32 −8
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@
#define INIT_SYM_TABLE  4096
#define INC_SYM_TABLE  4096
#define MAX_SYM_SIZE   128
#define DUMP_VERSION "1.1"
#define DUMP_VERSION "1.2"
#define HEX_INVALID  (uchar)255

typedef ulong my_long_addr_t ; /* at some point, we need to fix configure
@@ -72,14 +72,15 @@ static void usage()
  printf("MySQL AB, by Sasha Pachev\n");
  printf("This software comes with ABSOLUTELY NO WARRANTY\n\n");
  printf("Resolve numeric stack strace dump into symbols.\n\n");
  printf("Usage: %s [OPTIONS]\n", my_progname);
  printf("Usage: %s [OPTIONS] symbols-file [numeric-dump-file]\n", my_progname);
  printf("\n\
  -?, --help               Display this help and exit.\n\
  -h, --host=...           Connect to host.\n\
  -V, --version            Output version information and exit.\n\
  -n, --numeric-dump-file  File containing the numeric stack dump.\n\
  -s, --symbols-file=...   File containting the output of\
 nm --numeric-sort mysqld    .\n\n");
  -V, --version            Output version information and exit.\n");
  printf("\n\
The symbols-file should include the output from:  'nm --numeric-sort mysqld'.\n\
The numeric-dump-file should contain a numeric stack trace from mysqld.\n\
If the numeric-dump-file is not given, the stack trace is read from stdin.\n");
}


@@ -125,15 +126,38 @@ static int parse_args(int argc, char **argv)

  argc-=optind;
  argv+=optind;
  if (argc > 0)

  /*
    The following code is to make the command compatible with the old
    version that required one to use the -n and -s options
 */

  if (argc == 2)
  {
    sym_fname= argv[0];
    dump_fname= argv[1];
  }
  else if (argc == 1)
  {
    if (!sym_fname)
      sym_fname = argv[0];
    else if (!dump_fname)
      dump_fname = argv[0];
    else
    {
      usage();
      exit(1);
    }
  }
  else if (argc != 0 || !sym_fname)
  {
    usage();
    exit(1);
  }

  return 0;
}


static void open_files()
{
  fp_out = stdout;
+2 −0
Original line number Diff line number Diff line
@@ -4,5 +4,7 @@ libsdir = ../libs

INCLUDES =		-I../../include -I../include

CFLAGS= -g -O2 -DDEBUG_OFF

# Don't update the files from bitkeeper
%::SCCS/s.%
+4 −0
Original line number Diff line number Diff line
@@ -29,6 +29,10 @@ subdirectory of 'mysql'. */
#include <global.h>
#include <my_pthread.h>

/* Include <sys/stat.h> to get S_I... macros defined for os0file.c */
#include <sys/stat.h>


#undef PACKAGE
#undef VERSION

+6 −7
Original line number Diff line number Diff line
@@ -318,11 +318,8 @@ os_file_create(
	UT_NOT_USED(purpose);

	if (create_mode == OS_FILE_CREATE) {
#ifndef S_IRWXU
                file = open(name, create_flag);
#else
	        file = open(name, create_flag, S_IRWXU | S_IRWXG | S_IRWXO);
#endif
	        file = open(name, create_flag, S_IRUSR | S_IWUSR | S_IRGRP
			                     | S_IWGRP | S_IROTH | S_IWOTH);
        } else {
                file = open(name, create_flag);
        }
@@ -905,19 +902,21 @@ os_aio_init(
		os_aio_segment_wait_events[i] = os_event_create(NULL);
	}

#if defined(POSIX_ASYNC_IO) && defined(NOT_USED_WITH_MYSQL)
#ifdef POSIX_ASYNC_IO
	/* Block aio signals from the current thread and its children:
	for this to work, the current thread must be the first created
	in the database, so that all its children will inherit its
	signal mask */
	
	/* TODO: to work MySQL needs the SIGALARM signal; the following
	will not work yet! */
        sigemptyset(&sigset);
	sigaddset(&sigset, SIGRTMIN + 1 + 0);
	sigaddset(&sigset, SIGRTMIN + 1 + 1);
	sigaddset(&sigset, SIGRTMIN + 1 + 2);
	sigaddset(&sigset, SIGRTMIN + 1 + 3);

	pthread_sigmask(SIG_BLOCK, &sigset, NULL);
	pthread_sigmask(SIG_BLOCK, &sigset, NULL); */
#endif
}
				
Loading