Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
auth_update crash
Dec 23, 2017, 10:15 pm
By Remcon
check_tumble
Dec 18, 2017, 7:21 pm
By Remcon
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Yahoo!

Members: 0
Guests: 14
Stats
Files
Topics
Posts
Members
Newest Member
478
3,708
19,242
612
Jacki72H
Today's Birthdays
Evoru (32)
Related Links
» SmaugMuds.org » General » Smaug Snippets » dlsym question
Forum Rules | Mark all | Recent Posts

dlsym question
< Newer Topic :: Older Topic > Question about snippet

Pages:<< prev 1 next >>
Post is unread #1 Feb 2, 2005, 4:56 pm
Go to the top of the page
Go to the bottom of the page

Zarius
Apprentice
GroupMembers
Posts69
JoinedApr 23, 2002

I installed the dlsym snippet into a Smaug and I think I found a bug, but I can't seem to fix it. In Cedit if you create a command and change the code, it doesn't change the fun_name, but the code is changed. If I add in (From AFKMud)

DISPOSE( command->fun_name );command->fun_name = str_dup( argument );


I get a segfault when I change the code fun

*** glibc detected *** double free or corruption (out): 0x0a3aa800 ***

Any clue why this isn't working or how to fix the problem, its driving me nuts
       
Post is unread #2 Feb 2, 2005, 5:05 pm
Go to the top of the page
Go to the bottom of the page

Zarius
Apprentice
GroupMembers
Posts69
JoinedApr 23, 2002

Well, I solved my own issue.

In the snippet it says to add this line

command->fun_name = STRALLOC( arg2 );


I changed that to

command->fun_name = str_dup( arg2 );


Also added

DISPOSE(command->fun_name);


to free_commands function.

I knew as soon as I posted it, I'd figure it out.
       
Post is unread #3 Feb 2, 2005, 8:46 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

Yikes, thanks for that fix Zarius. Don't know how that one got past me

Anyway, the snippet has now been updated to include the missed steps and to correct the memory bug.
       
Pages:<< prev 1 next >>