.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   General Programming (http://forums.bots-united.com/forumdisplay.php?f=25)
-   -   Electric Fence linux (http://forums.bots-united.com/showthread.php?t=1451)

Cpl. Shrike 20-04-2004 15:18

Electric Fence linux
 
Anybody got expirience using "electric fence" on linux ??


Got so far as inluding the libefence.a to the link list.
like this.
Code:

  MOD_DIR = /usr/steam/hlds_l/tod/dlls/shrikebot_i586.so
  MOD_DIR2 = /usr/steam/hlds_l/dod/dlls/shrikebot_i586.so
 
  CPP = g++
  BASEFLAGS = -Dstricmp=strcasecmp -Dstrcmpi=strcasecmp
  CPPFLAGS = ${BASEFLAGS} -march=i586 -O2 -w -I../engine -I../common -I../pm_shared
 
  OBJ = bot.o bot_chat.o bot_client.o bot_combat.o bot_goal.o bot_models.o \
                  bot_navigate.o bot_start.o dll.o dll_command.o engine.o linkfunc.o \
          sb_export.o sb_util.o waypoint.o wptnav.o /usr/lib/libefence.a
 
  shrikebot_i586.so: ${OBJ}
          ${CPP} -fPIC -shared -o $@ ${OBJ} -Xlinker -Map -Xlinker shrike_bot.map -ldl
 
          cp -f shrikebot_i586.so ${MOD_DIR}
          cp -f shrikebot_i586.so ${MOD_DIR2}
 
  clean:
          -rm -f *.o
          -rm -f *.so       
 
  %.o:        %.cpp
          ${CPP} ${CPPFLAGS} -c $< -o $@
 
  %.o:        %.c
          ${CPP} ${CPPFLAGS} -c $< -o $@

And it compiles without error.

But im a little in the dark what to do next.
Documentation on the program is hard to find.
Just run the DLL ?? where can expect output ??
:|

stefanhendriks 20-04-2004 19:25

Re: Electric Fence linux
 
i have never heard of it. Any link for info?

Cpl. Shrike 20-04-2004 21:09

Re: Electric Fence linux
 
Err well that's kinda the problem. hard to find any tut's on it.

but it comes shiped with almost all linux distros.
"ElectricFence-2.2.2-13.RPM"

It's suppose to detect bad mallocs and overflows. =)

From the small bits and piece i found on google i understand it has to be compiled in. But i fail to grasp on how to actually use it. :(

stefanhendriks 20-04-2004 22:01

Re: Electric Fence linux
 
Found on google ;)

http://perens.com/FreeSoftware/
"my malloc() debugger for Linux and Unix. This will stop your program on the exact instruction that overruns or under-runs a malloc() buffer. "

http://packages.debian.org/unstable/...electric-fence
Package: electric-fence (2.1.13-0.1)

A malloc(3) debugger



Electric Fence is a debugger that uses virtual memory hardware to detect illegal memory accesses. It can detect two common programming bugs: software that overruns or underruns the boundaries of a malloc() memory allocation, and software that touches a memory allocation that has been released by free().

Unlike other malloc() debuggers, Electric Fence will detect read accesses as well as writes, and it will stop and pinpoint the exact instruction that causes an error. It is not as thorough as Purify, however. In order to debug a program it needs to be linked with Electric Fence's library or dynamic linking needs to be used; README.Debian explains that in detail.

...

i have a dozen of those links:
http://www.opennet.ru/prog/info/1373.shtml
http://www.portalux.com/detail?oid=2695
http://linux.maruhn.com/sec/electricfence.html

as far as i can tell from this information. It is a debugging tool as you described.

Cpl. Shrike 20-04-2004 22:37

Re: Electric Fence linux
 
yup and that's as far as the story goes
I visited all those linkies before. i do know google a little :D

It's just my n00b linux knowledge, im just missing some info somewhere down the line.

===========
edit.

Ahh i think i got something going here.

man libefence

Pierre-Marie Baty 20-04-2004 23:30

Re: Electric Fence linux
 
Quote:

Originally Posted by Cpl. Shrike
===========
edit.

Ahh i think i got something going here.

man libefence

:D ROFL.

I'm sure lots of things are going better now. :D

Cpl. Shrike 20-04-2004 23:34

Re: Electric Fence linux
 
Well to be honest i doubt it will ever turn a up an error.

I can run the server/bot for days on linux.
Trying to catch the bogus message id that was reported in the shrikebot section.


All times are GMT +2. The time now is 12:25.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.