This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

/lib/ld-2.5.so [stack]

General support and discussion of Eggdrop bots.
e
essexman
Voice
Posts: 17
Joined: Thu Sep 08, 2011 9:36 am

/lib/ld-2.5.so [stack]

Post by essexman »

Hi getting a stack problem here any ideas (newbie @ linux)


Eggdrop v1.6.20 (C) 1997 Robey Pointer (C) 2010 Eggheads
*** glibc detected *** ./eggdrop: free(): invalid next size (fast): 0x08af4030 ***ive done core dump last few lines below

b7e4b000-b7e4c000 rw-p 00027000 09:03 70018286 /lib/libm-2.5.so
b7e4c000-b7f40000 r-xp 00000000 09:03 71533217 /usr/local/lib/libtcl8.5.so
b7f40000-b7f46000 rw-p 000f4000 09:03 71533217 /usr/local/lib/libtcl8.5.so
b7f46000-b7f47000 rw-p b7f46000 00:00 0
b7f4d000-b7f4e000 rw-p b7f4d000 00:00 0
b7f4e000-b7f69000 r-xp 00000000 09:03 70018294 /lib/ld-2.5.so
b7f69000-b7f6a000 r--p 0001a000 09:03 70018294 /lib/ld-2.5.so
b7f6a000-b7f6b000 rw-p 0001b000 09:03 70018294 /lib/ld-2.5.so
bfd28000-bfd3d000 rw-p 7ffffffe9000 00:00 0 [stack]
Aborted (core dumped)
e
essexman
Voice
Posts: 17
Joined: Thu Sep 08, 2011 9:36 am

Post by essexman »

Would this be the patch to fix it ?
im unable to install any help please

(quote)Hey,

I tracked down the bug and it happens because of a behavioural change between Tcl8.5.9 and Tcl8.5.10.
(If you care for details: Tcl_ScanElement used to overestimate the required space, it was rewritten and apparently doesn't do that always anymore. Whether or not the terminating '\0' for strings is included in the estimate is the issue here, eggdrop's code assumes it is while the real return values of Tcl_ScanElement indicate otherwise.)

Here's a patch (patch -p1 < this.patch) to fix the issue:

Code:

diff -urN eggdrop1.6.20/src/tclhash.c eggdrop1.6.20.fix/src/tclhash.c
--- eggdrop1.6.20/src/tclhash.c 2010-06-29 17:52:24.000000000 +0200
+++ eggdrop1.6.20.fix/src/tclhash.c 2011-07-08 23:45:37.000000000 +0200
@@ -1264,7 +1264,7 @@
for (i = 0; cc.name; i++) {
egg_snprintf(p, sizeof p, "*%s:%s", tl->name,
cc.funcname ? cc.funcname : cc.name);
- l = nmalloc(Tcl_ScanElement(p, &k));
+ l = nmalloc(Tcl_ScanElement(p, &k)+1);
Tcl_ConvertElement(p, l, k | TCL_DONT_USE_BRACES);
table[0].cdata = (void *) cc.func;
add_cd_tcl_cmds(table);
@@ -1282,7 +1282,7 @@
for (i = 0; cc.name; i++) {
egg_snprintf(p, sizeof p, "*%s:%s", table->name,
cc.funcname ? cc.funcname : cc.name);
- l = nmalloc(Tcl_ScanElement(p, &k));
+ l = nmalloc(Tcl_ScanElement(p, &k)+1);
Tcl_ConvertElement(p, l, k | TCL_DONT_USE_BRACES);
Tcl_DeleteCommand(interp, p);
unbind_bind_entry(table, cc.flags, cc[i].name, l);
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Most likely yes.
NML_375
e
essexman
Voice
Posts: 17
Joined: Thu Sep 08, 2011 9:36 am

glibc detected

Post by essexman »

but unable to install i need some help
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Oh, sorry, missed that part of your post.
If you're not able to use the patch utility to apply the patch, try editing it by hand:
Locate the tclhash.c file located in the src directory, and open it in your favourite text editor.
Search for the word Tcl_ScanElement. You should find two occurences around line 1267 or so.
The lines should read:

Code: Select all

    l = nmalloc(Tcl_ScanElement(p, &k));
Change both lines into this:

Code: Select all

    l = nmalloc(Tcl_ScanElement(p, &k) + 1);
Compile your eggdrop in the usual manner.
NML_375
e
essexman
Voice
Posts: 17
Joined: Thu Sep 08, 2011 9:36 am

Post by essexman »

yes i thought that to

i added this on each line " + 1 " in the correct place
but no go for me same error
e
essexman
Voice
Posts: 17
Joined: Thu Sep 08, 2011 9:36 am

Post by essexman »

This is the error now

---------- Yeah! That's the compiling, now the linking! ----------

Linking eggdrop (standard build).

gcc -o ../eggdrop bg.o botcmd.o botmsg.o botnet.o chanprog.o cmds.o dcc.o dccuti l.o dns.o flags.o language.o match.o main.o mem.o misc.o misc_file.o modules.o n et.o rfc1459.o tcl.o tcldcc.o tclhash.o tclmisc.o tcluser.o userent.o userrec.o users.o -L/usr/local/lib -ltcl8.5 -lm -ldl -lnsl -lpthread md5/md5c.o compat/* .o `cat mod/mod.xlibs`
tclhash.o: In function `tell_binds':
/home/eggbot/eggdrop1.6.20/src/tclhash.c:1261: undefined reference to `_'
/home/eggbot/eggdrop1.6.20/src/tclhash.c:1262: undefined reference to `_'
/home/eggbot/eggdrop1.6.20/src/tclhash.c:1300: undefined reference to `_'
/home/eggbot/eggdrop1.6.20/src/tclhash.c:1302: undefined reference to `_'
tclhash.o: In function `del_bind_table':
/home/eggbot/eggdrop1.6.20/src/tclhash.c:318: undefined reference to `_'
tclhash.o:/home/eggbot/eggdrop1.6.20/src/tclhash.c:314: more undefined reference s to `_' follow
collect2: ld returned 1 exit status
make[1]: *** [../eggdrop] Error 1
make[1]: Leaving directory `/home/eggbot/eggdrop1.6.20/src'
make: *** [modegg] Error 2
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Errors regarding undefined references during linking usually means that you are missing some libraries. Usually, the configure-scripts catch these though.

Moreso, the suggested patch should not trigger a linking error such as that you describe. Can you verify that the same source compiles cleanly without the patch?
NML_375
e
essexman
Voice
Posts: 17
Joined: Thu Sep 08, 2011 9:36 am

Post by essexman »

it did compile fully before and after patch
only when i startup do i get problems
e
essexman
Voice
Posts: 17
Joined: Thu Sep 08, 2011 9:36 am

heres configure

Post by essexman »

This is Eggdrop's GNU configure script.
It's going to run a bunch of tests to hopefully make your compile
work without much twiddling.

checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for AIX... no
checking for library containing strerror... none required
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether the compiler understands -Wall... yes
checking whether the compiler understands -pipe... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether make sets $(MAKE)... yes
checking for ranlib... ranlib
checking whether ln -s works... yes
checking whether head -n 1 works... yes
checking for gawk... gawk
checking for basename... basename
checking for uname... uname
checking for socket in -lsocket... no
checking for connect in -lnsl... yes
checking for gethostbyname in -ldns... no
checking for dlopen in -ldl... yes
checking for tan in -lm... yes
checking for pthread_mutex_init in -lpthread... yes
checking system type... Linux
checking system release... 2.6.18-238.19.1.el5.028stab092.2
checking module loading capabilities...
checking dl.h usability... no
checking dl.h presence... no
checking for dl.h... no
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking loader.h usability... no
checking loader.h presence... no
checking for loader.h... no
checking rld.h usability... no
checking rld.h presence... no
checking for rld.h... no
checking mach-o/dyld.h usability... no
checking mach-o/dyld.h presence... no
checking for mach-o/dyld.h... no
checking mach-o/rld.h usability... no
checking mach-o/rld.h presence... no
checking for mach-o/rld.h... no
checking for dlopen... yes
checking for load... no
checking for NSLinkModule... no
checking for shl_load... no
checking for rld_load... no
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking whether time.h and sys/time.h may both be included... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking stdio.h usability... yes
checking stdio.h presence... yes
checking for stdio.h... yes
checking std_args.h usability... no
checking std_args.h presence... no
checking for std_args.h... no
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking sys/file.h usability... yes
checking sys/file.h presence... yes
checking for sys/file.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/rusage.h usability... no
checking sys/rusage.h presence... no
checking for sys/rusage.h... no
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking for an ANSI C-conforming const... yes
checking whether byte ordering is bigendian... no
checking for inline... inline
checking for pid_t... yes
checking for size_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for struct tm.tm_zone... yes
checking for working volatile... yes
checking for socklen_t... yes
checking for long... yes
checking size of long... 4
checking for int... yes
checking size of int... 4
checking for short... yes
checking size of short... 2
checking for clock... yes
checking for dprintf... yes
checking for fsync... yes
checking for getdtablesize... yes
checking for getrusage... yes
checking for inet_aton... yes
checking for isascii... yes
checking for mbrlen... yes
checking for memcpy... yes
checking for memset... yes
checking for random... yes
checking for rename... yes
checking for setpgid... yes
checking for sigaction... yes
checking for sigemptyset... yes
checking for snprintf... yes
checking for srandom... yes
checking for strcasecmp... yes
checking for strncasecmp... yes
checking for uname... yes
checking for vsnprintf... yes
checking for sys/select.h... (cached) yes
checking for sys/socket.h... (cached) yes
checking types of arguments for select... int,fd_set *,struct timeval *
checking for vprintf... yes
checking for _doprnt... no
checking for strftime... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for getpagesize... yes
checking for working mmap... yes
checking for broken libsafe sscanf... no
checking for Tcl library... found /usr/local/lib/libtcl8.5.so
checking for Tcl header... found /usr/local/include/tcl.h
checking whether the Tcl system has changed... yes
checking for Tcl version... 8.5
checking for Tcl patch level... 8.5.10
checking for Tcl_Free in -ltcl8.5... yes
checking for TclpFinalizeThreadData in -ltcl8.5... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating doc/Makefile
config.status: creating scripts/Makefile
config.status: creating src/Makefile
config.status: creating src/compat/Makefile
config.status: creating src/md5/Makefile
config.status: creating src/mod/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing replace-if-changed commands
lush.h is unchanged
config.status: executing catch-make-rebuild commands
Building ./src/mod/Makefile... done.

Operating System: Linux 2.6.18-238.19.1.el5.028stab092.2

If you experience any problems compiling Eggdrop, please read the
compile guide, found in doc/COMPILE-GUIDE.

Type 'make config' to configure the modules, or type 'make iconfig'
to interactively choose which modules to compile.
e
essexman
Voice
Posts: 17
Joined: Thu Sep 08, 2011 9:36 am

make config

Post by essexman »

eggdrop1.6.19]$ make config
Checking for removed modules.................... done.
Detecting modules.................... done.
Calculating dependencies................... done.
Building ./src/mod/Makefile... done.
make[1]: Entering directory `/home/eggbot/eggdrop1.6.19/src/mod'

Configuring module 'compress'.
configure: loading cache ../../../config.cache
checking for gcc... (cached) gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... (cached) o
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ANSI C... (cached) none needed
checking for gzopen in -lz... (cached) yes
checking how to run the C preprocessor... (cached) gcc -E
checking for egrep... (cached) grep -E
checking for ANSI C header files... (cached) yes
checking for sys/types.h... (cached) yes
checking for sys/stat.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for memory.h... (cached) yes
checking for strings.h... (cached) yes
checking for inttypes.h... (cached) yes
checking for stdint.h... (cached) yes
checking for unistd.h... (cached) yes
checking for zlib.h... (cached) yes
configure: creating ./config.status
config.status: creating Makefile

Configuring module 'dns'.
configure: loading cache ../../../config.cache
checking for gcc... (cached) gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... (cached) o
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ANSI C... (cached) none needed
checking for res_init... (cached) no
checking for res_init in -lresolv... (cached) no
checking for res_init in -lbind... (cached) no
checking for __res_init... (cached) yes
checking for res_mkquery... (cached) no
checking for res_mkquery in -lresolv... (cached) yes
checking build system type... (cached) i686-pc-linux-gnu
checking host system type... (cached) i686-pc-linux-gnu
configure: creating ./config.status
config.status: creating Makefile

make[1]: Leaving directory `/home/eggbot/eggdrop1.6.19/src/mod'
Building ./src/mod/Makefile... done.
e
essexman
Voice
Posts: 17
Joined: Thu Sep 08, 2011 9:36 am

Post by essexman »

Eggdrop successfully compiled:
-rwxrwxr-x 1 eggbot eggbot 889588 Sep 10 16:42 eggdrop

Modules successfully compiled:
-rwxrwxr-x 1 eggbot eggbot 20458 Sep 8 20:59 assoc.so
-rwxrwxr-x 1 eggbot eggbot 24836 Sep 8 20:59 blowfish.so
-rwxrwxr-x 1 eggbot eggbot 227292 Sep 8 20:59 channels.so
-rwxrwxr-x 1 eggbot eggbot 21570 Sep 8 20:59 compress.so
-rwxrwxr-x 1 eggbot eggbot 18948 Sep 8 20:59 console.so
-rwxrwxr-x 1 eggbot eggbot 15644 Sep 8 20:59 ctcp.so
-rwxrwxr-x 1 eggbot eggbot 32190 Sep 8 20:59 dns.so
-rwxrwxr-x 1 eggbot eggbot 176391 Sep 8 20:59 filesys.so
-rwxrwxr-x 1 eggbot eggbot 270876 Sep 8 20:59 irc.so
-rwxrwxr-x 1 eggbot eggbot 58369 Sep 8 20:59 notes.so
-rwxrwxr-x 1 eggbot eggbot 27630 Sep 8 20:59 seen.so
-rwxrwxr-x 1 eggbot eggbot 120200 Sep 8 20:59 server.so
-rwxrwxr-x 1 eggbot eggbot 88009 Sep 8 20:59 share.so
-rwxrwxr-x 1 eggbot eggbot 69404 Sep 8 20:59 transfer.so
-rwxrwxr-x 1 eggbot eggbot 14603 Sep 8 20:59 uptime.so
-rwxrwxr-x 1 eggbot eggbot 26586 Sep 8 20:59 wire.so
e
essexman
Voice
Posts: 17
Joined: Thu Sep 08, 2011 9:36 am

Post by essexman »

eggdrop1.6.19]$ make install

Eggdrop v1.6.19+ctcpfix (C) 1997 Robey Pointer (C) 2008 Eggheads
(patches: ctcpfix)

Installing in directory: '/home/eggbot/eggdrop'.

Removing symlink to archival eggdrop binary.
Copying new 'eggdrop' executable and creating symlink.
Removing symlink to archival modules subdirectory.
Creating 'modules-1.6.19' subdirectory and symlink.
Copying new modules.
Copying help files.
make[1]: Entering directory `/home/eggbot/eggdrop1.6.19/src/mod'
Copying module help files.
make[1]: Leaving directory `/home/eggbot/eggdrop1.6.19/src/mod'
Copying language files.
make[1]: Entering directory `/home/eggbot/eggdrop1.6.19/src/mod'
Copying module language files.
make[1]: Leaving directory `/home/eggbot/eggdrop1.6.19/src/mod'
make[1]: Entering directory `/home/eggbot/eggdrop1.6.19/doc'
Copying docs.
make[1]: Leaving directory `/home/eggbot/eggdrop1.6.19/doc'
make[1]: Entering directory `/home/eggbot/eggdrop1.6.19/scripts'
make[1]: Leaving directory `/home/eggbot/eggdrop1.6.19/scripts'

Installation completed.

You MUST ensure that you edit/verify your configuration file.
An example configuration file, eggdrop.conf, is distributed with Eggdrop.

Remember to change directory to /home/eggbot/eggdrop before you proceed.
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

I am getting a bit confused now, as the last error you posted was indeed a linking error, not a runtime error.

If you can successfully compile the source with the patch applied, does this fix your initial runtime error or not?

Also, now you are building 1.6.19 instead of 1.6.20?
NML_375
e
essexman
Voice
Posts: 17
Joined: Thu Sep 08, 2011 9:36 am

Post by essexman »

ok
i have tried both with same problem error
i have just cleared all and started over again
i installed 1.6.20 got same problem after patch was added

b7f6a000-b7f6b000 rw-p 0001b000 09:03 70018294 /lib/ld-2.5.so
bfd28000-bfd3d000 rw-p 7ffffffe9000 00:00 0 [stack]
i am running on a centos vps
bot is not root but user account

bit lost

regards
Post Reply