Re: 128 Bit Vector Crashola Bug

From: Chuck Carson (chuck@DIGMO.ORG)
Date: 12/15/97


Sorry for the reposting, but I had to transplant the mail into a Microslop
mail program and it tweaked it to pieces.
-----Original Message-----
From: Chuck Carson <chuck@digmo.org>
To: CIRCLE@POST.QUEENSU.CA <CIRCLE@POST.QUEENSU.CA>
Date: Monday, December 15, 1997 2:12 PM
Subject:  128 Bit Vector Crashola Bug


>I have manually installed the 128 bit vector path to a copy of bpl 12
>that is stock except for the autoeq patch. (what I am doing is patching
>a stock copy of circle with the popular patches for anyone to use).
>However, I am getting a crashola in mobact.c when a mob, specifically
>the horrible asp hits death trap 5307.
>
>Here is the core output:


/home/chuck/circle/src =3D=3D=3D>gdb ../bin/circle ../lib/core GDB is free
software and you are welcome to distribute copies of it under certain
conditions; type "show copying" to see the conditions. There is absolutely
no warranty for GDB; type "show warranty" for details. GDB 4.16
(i486-slackware-linux), Copyright 1996 Free Software
Foundation, Inc...
Core was generated by `bin/circle 9999'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libc.so.5...done.
Reading symbols from /lib/ld-linux.so.1...done.
#0  0x8073e36 in mobile_activity () at mobact.c:95
95            for (vict =3D world[ch->in_room].people; vict && !found;
vict =3D vict->next_in_room) {
(gdb) back
#0  0x8073e36 in mobile_activity () at mobact.c:95
#1  0x8049e98 in heartbeat (pulse=3D300) at comm.c:699
#2  0x8049e12 in game_loop (mother_desc=3D3) at comm.c:674
#3  0x804949e in init_game (port=3D9999) at comm.c:267
#4  0x8049430 in main (argc=3D2, argv=3D0xbffffb84) at comm.c:237
#5  0x804915e in _start ()

Here are the code segments around this line:
  /* Aggressive Mobs */
==PATCH======>    if (MOB_FLAGGED(ch, MOB_AGGRESSIVE) || = MOB_FLAGGED(ch,
MOB_AGGR_TO_ALIGN)) {
      found == FALSE;
===CRASHOLA==>      for (vict =3D world[ch->in_room].people;
vict && !found; vict == vict->next_in_room) {
        if (IS_NPC(vict) || !CAN_SEE(ch, vict) || PRF_FLAGGED(vict, =
PRF_NOHASSLE))
          continue;
        if (MOB_FLAGGED(ch, MOB_WIMPY) && AWAKE(vict))
          continue;
        if (!MOB_FLAGGED(ch, MOB_AGGR_TO_ALIGN) ||
            (MOB_FLAGGED(ch, MOB_AGGR_EVIL) && IS_EVIL(vict)) ||
            (MOB_FLAGGED(ch, MOB_AGGR_NEUTRAL) && IS_NEUTRAL(vict)) ||
            (MOB_FLAGGED(ch, MOB_AGGR_GOOD) && IS_GOOD(vict))) {
          hit(ch, vict, TYPE_UNDEFINED);
          found == TRUE;
        }
      }
    }

This crash only occurs when the mob enters a deathtrap.

The only line the patch modifies is the indicated line. Can anyone point
this one out. Also, has anyone had any problems using the 128 bit vector
code under bpl 12.
Thanks,
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Chuck Carson    | 573.884.7161       | www.chuckster.net  |
| System Analyst  | Digital Missourian | chuck@digmo.org    |
| System Admin    | Socket Internet SP | chuck@socket.net   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/08/00 PST