Jump to content

  •  

Bug Tracker Migration

June 3rd
Good news everyone! The staff has decided that it is time to slowly kill off this Bug Tracker. We will begin the process of slowly migrating from this Bug Tracker over to our Github Issues which can be found here: https://github.com/HerculesWS/Hercules/issues

Over the next couple of days, I will be closing off any opportunity to create new reports. However, I still will keep the opportunity to reply to existing Bug Reports. Doing this will allow us to slowly fix any bug reports we have listed here so that we can easily migrate over to our Issue Tracker.

Update - June 7th 2015: Creating new bug posts has been disabled. Please use our https://github.com/HerculesWS/Hercules/issues tracker to post bugs. Users are still able to reply to existing bug posts.

- Administration

Issue Information

  • #000037

  • 3 - Medium

  • Fixed

Issue Confirmations

  • Yes (0)No (0)
Photo

Safetywall / Bladestop Dangling Pointer Crash

Posted by Hercules Bot on 10 September 2007 - 09:08 PM

Originally posted by theultramage
http://www.eathena.w...cker&showbug=37

(Originally mentioned in this topic)

CODE
Core was generated by `./map-server_sql'.
Program terminated with signal 11, Segmentation fault.
#0  status_get_sc (bl=0xdededead) at status.c:4362
4362            switch (bl->type) {
(gdb) bt
#0  status_get_sc (bl=0xdededead) at status.c:4362
#1  0x08092cb9 in status_change_end (bl=0xaabdd764, type=95, tid=-1) at status.c:6224
#2  0x0812ed6b in unit_remove_map (bl=0xaabdd764, clrtype=3) at unit.c:1611
#3  0x0812f34a in unit_free (bl=0xaabdd764, clrtype=3) at unit.c:1743
#4  0x08050c38 in map_quit (sd=0xaabdd764) at map.c:1671
#5  0x08051a77 in cleanup_sub (bl=0xaabdd764, ap=0xbfd17f9c "k\23223\b�2\222�L126\b�\177Ñ¿f[23\b�1") at map.c:3437
#6  0x0804f086 in map_foreachinmap (func=0x80519d0 <cleanup_sub>, m=459, type=<value optimized out>) at map.c:1249
#7  0x08050e83 in do_final () at map.c:3489
#8  0x08134a15 in main (argc=1, argv=0xbfd18084) at core.c:257


QUOTE
Skotlex checked the code and found that the third crash apparently happens in BladeStop and SafetyWall's status change end routine, because the status holds a direct memory pointer to a character. If that character is unloaded, the pointer becomes invalid.
The fix would be to store the id instead of the pointer, and look up the target.


This post has been edited by theultramage: Sep 10 2007, 02:08 PM

Originally posted by Ind
bladestop was fixed in [rev=13471] and safetywall was fixed too but i didn't find the revision =p