Comments (2)
OK, it looks like I've just reproduced this again, including some more details. (sdlayer.cpp's line number may be different here, too, again due to some unrelated local change of mine.)
==8819==ERROR: AddressSanitizer: unknown-crash on address 0x555555c731a4 at pc 0x5555557126cb bp 0x7fffffffd8f0 sp 0x7fffffffd8e0
READ of size 52 at 0x555555c731a4 thread T0
#0 0x5555557126ca in thinkPonder source/blood/src/aizomba.cpp:184
#1 0x5555556d360a in aiProcessDudes() source/blood/src/ai.cpp:1325
#2 0x5555556c8d47 in actProcessSprites() source/blood/src/actor.cpp:5398
#3 0x5555556939ad in ProcessFrame() source/blood/src/blood.cpp:915
#4 0x555555697367 in app_main source/blood/src/blood.cpp:1666
#5 0x555555a04353 in main source/build/src/sdlayer.cpp:494
#6 0x7ffff609309a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409a)
#7 0x55555568c309 in _start (/mnt/hdd/Games/nblood/NBlood/nblood+0x138309)
0x555555c731a4 is located 60 bytes to the left of global variable 'xsprite' defined in 'source/blood/src/db.cpp:38:9' (0x555555c731e0) of size 122880
0x555555c731c0 is located 0 bytes to the right of global variable 'xsector' defined in 'source/blood/src/db.cpp:39:9' (0x555555c6b9c0) of size 30720
SUMMARY: AddressSanitizer: unknown-crash source/blood/src/aizomba.cpp:184 in thinkPonder
Shadow bytes around the buggy address:
0x0aab2ab865e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0aab2ab865f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0aab2ab86600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0aab2ab86610: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0aab2ab86620: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0aab2ab86630: 00 00 00 00[00]00 00 00 f9 f9 f9 f9 00 00 00 00
0x0aab2ab86640: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0aab2ab86650: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0aab2ab86660: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0aab2ab86670: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0aab2ab86680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==8819==ABORTING
Thread 1 "nblood" received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) p pTarget
No symbol "pTarget" in current context.
(gdb) bt
#0 0x00007ffff60b0077 in __GI_raise (sig=sig@entry=6)
at ../sysdeps/unix/sysv/linux/raise.c:50
#1 0x00007ffff6091535 in __GI_abort () at abort.c:79
#2 0x00007ffff72e428e in () at /usr/lib/x86_64-linux-gnu/libasan.so.5
#3 0x00007ffff72ec978 in () at /usr/lib/x86_64-linux-gnu/libasan.so.5
#4 0x00007ffff72cff35 in () at /usr/lib/x86_64-linux-gnu/libasan.so.5
#5 0x00007ffff72d1104 in __asan_report_load_n ()
at /usr/lib/x86_64-linux-gnu/libasan.so.5
#6 0x00005555557126cb in thinkPonder(spritetype*, XSPRITE*)
(pSprite=0x555555f6ca1c <sprite_s+10076>, pXSprite=0x555555c8ea44 <xsprite+112740>)
at source/blood/src/aizomba.cpp:178
#7 0x00005555556d360b in aiProcessDudes() () at source/blood/src/ai.cpp:1325
#8 0x00005555556c8d48 in actProcessSprites() () at source/blood/src/actor.cpp:5398
#9 0x00005555556939ae in ProcessFrame() () at source/blood/src/blood.cpp:915
#10 0x0000555555697368 in app_main(int, char const* const*)
(argc=<optimized out>, argv=<optimized out>) at source/blood/src/blood.cpp:1666
#11 0x0000555555a04354 in main(int, char**) (argc=1, argv=0x7fffffffdfe8)
at source/build/src/sdlayer.cpp:494
(gdb) up
#1 0x00007ffff6091535 in __GI_abort () at abort.c:79
79 abort.c: No such file or directory.
(gdb) up
#2 0x00007ffff72e428e in ?? () from /usr/lib/x86_64-linux-gnu/libasan.so.5
(gdb) up
#3 0x00007ffff72ec978 in ?? () from /usr/lib/x86_64-linux-gnu/libasan.so.5
(gdb) up
#4 0x00007ffff72cff35 in ?? () from /usr/lib/x86_64-linux-gnu/libasan.so.5
(gdb) up
#5 0x00007ffff72d1104 in __asan_report_load_n ()
from /usr/lib/x86_64-linux-gnu/libasan.so.5
(gdb) up
#6 0x00005555557126cb in thinkPonder (pSprite=0x555555f6ca1c <sprite_s+10076>,
pXSprite=0x555555c8ea44 <xsprite+112740>) at source/blood/src/aizomba.cpp:178
178 dassert(pXSprite->target >= 0 && pXSprite->target < kMaxSprites);
(gdb) p pXSprite
$1 = (XSPRITE *) 0x555555c8ea44 <xsprite+112740>
(gdb) p pXTarget
$2 = (XSPRITE *) 0x555555c731a4 <xsector+30692>
(gdb) p xsprite
value requires 122880 bytes, which is more than max-value-size
(gdb) p sizeof(xsprite)/sizeof(*xsprite)
$3 = 2048
(gdb) p sizeof(sector)/sizeof(*xsector)
$4 = 0
(gdb) p sizeof(xsector)/sizeof(*xsector)
$5 = 512
(gdb) p pXSprite->target
$6 = 544
(gdb) p dx
$7 = 1880
(gdb) p dy
$8 = 5361
(gdb) p pXTarget
$9 = (XSPRITE *) 0x555555c731a4 <xsector+30692>
(gdb) p pXTarget->health
$10 = 0
from nblood.
I think for some reason target sprite has no associated XSPRITE structure(i.e pTarget->extra == -1) and game tries to read xsprite[-1].health
from nblood.
Related Issues (20)
- NBlood: Monolith FMV cuts off early HOT 1
- [PCExhumed] Small Feature Request - Add Option to Skip Intro Screens and Pharoah's Laugh and Go Straight to Main Menu HOT 2
- Shareware/Demos not working HOT 2
- [Pcexhumed]Garbled textures HOT 1
- macOS artifacts/release files? HOT 1
- [NBlood] Saved games won't load when game is started with -game_dir HOT 1
- Eviction Episode 2 crashes without errors
- Voxels not transparent in Classic (software) renderer HOT 1
- [Nblood] Feature request Toggle Crouch and Disable Vertical Axis on mouse / Bug report r_upscalefactor not applying after restart. HOT 3
- Save games are not being loaded HOT 11
- error: parameter 'XXX" is undefined when launching Liquidator 3D HOT 1
- Force Joystick input?
- HUD - Show Messages Option Resets Itself Every Launch HOT 1
- [Nblood] Cryptic Passage as an episode HOT 1
- [PCExhumed] Mouse in menus
- Nblood weapon switch animation problem
- [PCExhumed] -mh command line parameter doesn't work HOT 1
- [Question] Extinguished faster than normal? HOT 3
- [NBlood] Enemy death sounds randomly cut out HOT 4
- [QUESTION] Nuked-SC-55 support HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nblood.