elunna / hackem

SlashEM forked Unto Evil with a Splice of X and a dash of THEM.
Other
23 stars 8 forks source link

calculate_flankers: youflanker and youattack both TRUE! #523

Closed elunna closed 11 months ago

elunna commented 11 months ago

Found while fuzzing

#1  0x00007ffff7360859 in __GI_abort () at abort.c:79
#2  0x0000555555aa5bb4 in NH_abort () at end.c:235
#3  0x0000555555aacd93 in panic (str=0x555556653080 "%s") at end.c:800
#4  0x0000555556032e6f in impossible (
    s=0x5555565f83a0 "calculate_flankers: youflanker and youattack both TRUE!") at pline.c:685
#5  0x0000555555d902a6 in calculate_flankers (magr=0x555556936740 <youmonst>,
    mdef=0x61100048f200) at mhitu.c:5826
#6  0x00005555562fafbf in find_roll_to_hit (mtmp=0x61100048f200, aatyp=1 '\001', weapon=0x0,
    attk_count=0x7fffffffdae0, role_roll_penalty=0x7fffffffdac0) at uhitm.c:313
#7  0x0000555556364588 in hmonas (mon=0x61100048f200, as=-1, weapon_attacks=1 '\001')
    at uhitm.c:4419
#8  0x000055555630258b in attack (mtmp=0x61100048f200) at uhitm.c:618
#9  0x0000555555b2da11 in domove_core () at hack.c:1774
#10 0x0000555555b152cd in domove () at hack.c:1463
#11 0x00005555558b49c6 in rhack (cmd=0x555556921d20 <in_line> "1") at cmd.c:5774
#12 0x00005555557a2450 in moveloop (resuming=0 '\000') at allmain.c:812
#13 0x00005555564c8bf6 in main (argc=0, argv=0x7fffffffe628) at ../sys/unix/unixmain.c:353

(gdb) p toplines
$1 = 0x55555693a220 <toplines> "Welcome to experience level 3."

(gdb) p u.umonster
$2 = 758 (Rogue)
(gdb) p u.umonnum
$3 = 174 (Dream thief)

Mdef = PM_STEAM_VORTEX
mhp = 0,  mhpmax = 48,

Ok, so the steam vortex is dead.

(gdb) p u.ustuck
$5 = (struct monst *) 0x0
(gdb) p u.uswallow
$6 = 0

Not engulfed