OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: KF (dotslashsnosoft.com)
Date: Thu Apr 04 2002 - 06:10:22 CST

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    I am just poking a some more progress binaries this weekend and I ran
    across this issue. Based on the gdb dumps I thought that something may
    be wrong with regex. Not sure though. libg++-2.7.2.8-9.src.rpm Said it
    was from redhat 5.2 on rpmfind.net but it is installed on my 7.2 box for
    some reason.

    [rootghetto dotslash]# cat /etc/redhat-release
    Red Hat Linux release 7.2 (Enigma)
    [rootghetto dotslash]# rpm -qa | grep libg
    libg++-2.7.2.8-9

    [rootghetto bin]# gdb -q ./showcfg
    (gdb) r `perl -e 'print "A" x 9000'`
    Starting program: /home/dlc/bin/./showcfg `perl -e 'print "A" x 9000'`

     Error: Cannot open the configuration file

    Program received signal SIGSEGV, Segmentation fault.
    __libc_free (mem=0x41414141) at malloc.c:3136
    3136 malloc.c: No such file or directory.
            in malloc.c
    (gdb) bt
    #0 __libc_free (mem=0x41414141) at malloc.c:3136
    #1 0x400584ee in Regex::~Regex (this=0x40078b98, __in_chrg=2) at
    Regex.cc:42
    #2 0x400587d1 in global destructors keyed to Regex::Regex () at
    Regex.cc:149
    #3 0x40057950 in __do_global_dtors_aux () from /usr/lib/libg++.so.2.7.2
    #4 0x400770a5 in _fini () from /usr/lib/libg++.so.2.7.2
    #5 0x4000de72 in _dl_fini () at eval.c:41
    #6 0x400ed42b in exit (status=65535) at exit.c:54
    #7 0x08073b78 in main () at eval.c:41
    #8 0x400d8507 in __libc_start_main (main=0x80739f0 <main>, argc=2,
    ubp_av=0xbfffd844, init=0x804beb0 <_init>,
        fini=0x808f2ec <_fini>, rtld_fini=0x4000dc14 <_dl_fini>,
    stack_end=0xbfffd83c) at ../sysdeps/generic/libc-start.c:129

    heres the snippet from Regex.cc
    Regex::~Regex()
    {
      if (buf->buffer) free(buf->buffer);
      if (buf->fastmap) free(buf->fastmap);
      if (buf->translate) free (buf->translate);

      if (reg->start)
        free (reg->start);
      if (reg->end)
        free (reg->end);

      delete(buf);
      delete(reg);
    }

    -KF