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, DotBot, Yandex, Sogou, Yahoo!

Members: 0
Guests: 8
Stats
Files
Topics
Posts
Members
Newest Member
478
3,708
19,242
612
Jacki72H
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » General » General Discussions » Weird crash with __kernel_vsy...
Forum Rules | Mark all | Recent Posts

Weird crash with __kernel_vsyscall
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Mar 23, 2006, 2:49 pm   Last edited Mar 23, 2006, 4:22 pm by Zeno
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

I think I've seen this happen a while ago, but hasn't for a while. Just today it happened.
#0  0x00bfc402 in __kernel_vsyscall ()
#1  0x00979118 in raise () from /lib/libc.so.6
#2  0x0097a888 in abort () from /lib/libc.so.6
#3  0x009ae22a in __libc_message () from /lib/libc.so.6
#4  0x009b4124 in _int_free () from /lib/libc.so.6
#5  0x009b465f in free () from /lib/libc.so.6
#6  0x0815b852 in obj_update () at update.c:1819
#7  0x0815ce7e in update_handler () at update.c:2598
#8  0x080c0b63 in game_loop () at comm.c:1257
#9  0x080bfed0 in main (argc=2, argv=0xbff7b9d4) at comm.c:602

#6  0x0815b852 in obj_update () at update.c:1819
1819                STRFREE( obj->description );

(gdb) p obj->description
$1 = 0x97a19f0 ""

Has to do with corpse descs updating?
Any clues? Did I miss a bugfix a while back? Can't remember if I brought this up before.
       
Post is unread #2 Mar 24, 2006, 5:56 am
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,868
JoinedJul 26, 2005

thats an issue of using STRALLOC( "" ) on things.
The bad thing here is that the code has been setup to do that so that everything didn't have to be checked correctly to make sure it exist before using.
It takes a good bit of work to correctly do everything, but it can be done :)
       
Post is unread #3 Mar 25, 2006, 10:07 am
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

STRALLOC? The line had STRFREE, or am I missing something here? What should be done? Check if the first character exists?
       
Post is unread #4 Mar 25, 2006, 10:43 am
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

#5  0x009b465f in free () from /lib/libc.so.6
#6  0x0815b852 in obj_update () at update.c:1819


I don't think this has much to do with STRALLOCing an empty string. STRFREEing one usually works without much trouble. The code path in your backtrace looks a bit odd. What is the code block surrounding 1819 in update.c?
       
Post is unread #5 Mar 25, 2006, 3:43 pm   Last edited Mar 25, 2006, 3:43 pm by Zeno
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

Around 1819:
          if ( obj->timer > 0 && obj->value[2] > timerfrac )
          {
            char buf[MAX_STRING_LENGTH];
            char name[MAX_STRING_LENGTH];
            char *bufptr;
            bufptr = one_argument( obj->short_descr, name );
            bufptr = one_argument( bufptr, name );
            bufptr = one_argument( bufptr, name );

            separate_obj(obj);
            obj->value[2] = timerfrac;
            sprintf( buf, corpse_descs[ UMIN( timerfrac - 1, 4 ) ],
                          bufptr );

            STRFREE( obj->description );
            obj->description = STRALLOC( buf );
          }

Line 1819 is STRFREE line.
       
Post is unread #6 Mar 25, 2006, 7:53 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,868
JoinedJul 26, 2005

Actually I have had that issue before. Normaly I always found it to be on empty strings being used. If you ever take the time to stop using empty strings and change it all to correctly handle NULL things and check everything before using it, and then stop it from tossing in "" strings you will be better off. So far thats the only way i found to deal with it lol and yea its not that easy of a task but compared to some things its not that bad :)
       
Pages:<< prev 1 next >>