.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Developer's Farm > General Programming
General Programming Help others and get yourself helped here!

Reply
 
Thread Tools
Electric Fence linux
Old
  (#1)
Cpl. Shrike
ShrikeBot Coder/Moderator
 
Cpl. Shrike's Avatar
 
Status: Offline
Posts: 550
Join Date: Mar 2004
Location: The Netherlands
Default Electric Fence linux - 20-04-2004

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 ??
  
Reply With Quote
Re: Electric Fence linux
Old
  (#2)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
Default Re: Electric Fence linux - 20-04-2004

i have never heard of it. Any link for info?


Author of RealBot, "Arrakis" and "Dune 2 - The Maker" | co-Founder of Bots-United | Fundynamic | Blog | E-Mail me
  
Reply With Quote
Re: Electric Fence linux
Old
  (#3)
Cpl. Shrike
ShrikeBot Coder/Moderator
 
Cpl. Shrike's Avatar
 
Status: Offline
Posts: 550
Join Date: Mar 2004
Location: The Netherlands
Default Re: Electric Fence linux - 20-04-2004

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.
  
Reply With Quote
Re: Electric Fence linux
Old
  (#4)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
Default Re: Electric Fence linux - 20-04-2004

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.


Author of RealBot, "Arrakis" and "Dune 2 - The Maker" | co-Founder of Bots-United | Fundynamic | Blog | E-Mail me
  
Reply With Quote
Re: Electric Fence linux
Old
  (#5)
Cpl. Shrike
ShrikeBot Coder/Moderator
 
Cpl. Shrike's Avatar
 
Status: Offline
Posts: 550
Join Date: Mar 2004
Location: The Netherlands
Default Re: Electric Fence linux - 20-04-2004

yup and that's as far as the story goes
I visited all those linkies before. i do know google a little

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
  
Reply With Quote
Re: Electric Fence linux
Old
  (#6)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: Electric Fence linux - 21-04-2004

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

Ahh i think i got something going here.

man libefence
.

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



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: Electric Fence linux
Old
  (#7)
Cpl. Shrike
ShrikeBot Coder/Moderator
 
Cpl. Shrike's Avatar
 
Status: Offline
Posts: 550
Join Date: Mar 2004
Location: The Netherlands
Default Re: Electric Fence linux - 21-04-2004

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.
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com