![]() |
#61 | |
Veteran
Join Date: Jun 2007
Posts: 1,372
![]() |
Quote:
Also, about the pointer bits: See my post about -fsanitize. (Will require a semi-recent GCC/Clang, i.e. something released in the last two years, or thereabouts.) |
|
![]() |
![]() |
![]() |
#62 | |
Vanilla maintainer
Join Date: Apr 2007
Location: Canberra, Australia
Age: 55
Posts: 8,671
Donated: $60
![]() |
Quote:
The main issue with Windows is just that we don't have any of the dev team compiling on it routinely at the moment, and our autobuilders are nearly all Linux too. On the plus side, the one that isn't is OpenBSD...
__________________
One for the Dark Lord on his dark throne In the Land of Mordor where the Shadows lie. |
|
![]() |
![]() |
![]() |
#63 | |
PosChengband Maintainer
Join Date: Jan 2008
Posts: 702
![]() |
Quote:
Also, the output is hideous: Code:
#3 0x5a57af (/home/chris/Src/poschengband/poschengband+0x5a57af) #4 0x5a904a (/home/chris/Src/poschengband/poschengband+0x5a904a) #5 0x9ed773 (/home/chris/Src/poschengband/poschengband+0x9ed773) #6 0x7fb93812cec4 (/lib/x86_64-linux-gnu/libc-2.19.so+0x21ec4) #7 0x403828 (/home/chris/Src/poschengband/poschengband+0x403828) Address 0x7fff0742c4e1 is located at offset 113 in frame <Term_text_gcu> of T0's stack: You see no visible monsters. This frame has 1 object(s): a granite wall blocking your way. <x2> You have [32, 113) 'text'. The Blinking dot blinks awayHINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext Autosaving the game... (longjmp and C++ exceptions *are* supported)e surface. Target Aborted. Shadow bytes around the buggy address: 0x100060e7d840: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x100060e7d850: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x100060e7d860: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x100060e7d870: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x100060e7d880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 =>0x100060e7d890: f1 f1 00 00 00 00 00 00 00 00 00 00[01]f4 00 00 0x100060e7d8a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x100060e7d8b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x100060e7d8c0: 00 00 00 00 f1 f1 f1 f1 01 f4 f4 f4 f2 f2 f2 f2 0x100060e7d8d0: 01 f4 f4 f4 f3 f3 f3 f3 00 00 00 00 00 00 00 00 0x100060e7d8e0: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 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 Heap righ redzone: fb Freed Heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 ASan internal: fe ==4654== ABORTING chris@chris-Studio-XPS-1645:~/Src/poschengband > Code:
*** stack smashing detected ***: /home/chris/Src/poschengband/poschengband terminated Program received signal SIGABRT, Aborted. 0x00007ffff72c9cc9 in raise () from /lib/x86_64-linux-gnu/libc.so.6 (gdb) bt #0 0x00007ffff72c9cc9 in raise () from /lib/x86_64-linux-gnu/libc.so.6 #1 0x00007ffff72cd0d8 in abort () from /lib/x86_64-linux-gnu/libc.so.6 #2 0x00007ffff7306f24 in ?? () from /lib/x86_64-linux-gnu/libc.so.6 #3 0x00007ffff739e82c in __fortify_fail () from /lib/x86_64-linux-gnu/libc.so.6 #4 0x00007ffff739e7d0 in __stack_chk_fail () from /lib/x86_64-linux-gnu/libc.so.6 #5 0x0000000000672ac1 in Term_text_gcu (x=13, y=48, n=99, a=15 '\017', s=0xa2918d '#' <repeats 99 times>, ' ' <repeats 101 times>...) at main-gcu.c:1125 #6 0x0000000000676069 in Term_fresh_row_text (y=48, x1=0, x2=145) at z-term.c:1052 #7 0x0000000000676804 in Term_fresh () at z-term.c:1422 #8 0x00000000004c1d94 in dungeon (load_game=1 '\001') at dungeon.c:5281 #9 0x00000000004c3535 in play_game (new_game=0 '\000') at dungeon.c:6034 #10 0x000000000067974f in main (argc=1, argv=0x7fffffffdde8) at main.c:779 (gdb) |
|
![]() |
![]() |
![]() |
#64 |
Veteran
Join Date: Jun 2007
Posts: 1,372
![]() |
(On a tablet, so forgive the brevity)
Output: there may be an option or env variable you can set to force sanitizer output to a file. If not, I'm pretty sure you can just redirect stderr to a file, eg using "2>1 myfile" as the last part of the command line. (The reason the output is mangled is that ncurses disables newlines on the terminal.) About the missing "undefined": see the gcc manual, i was workingfrom memory and the option may be a little different, something to do with "undefined behavior". It's possible that the option wasn't available in gcc 4.8. Generally i'd recommend clang when using the sanitizer since it usually has more recent support. (And is mostly cmdline compatible with gcc.) EDIT: Sorry, "2>&1 myfile" should obviously have been "2> myfile". Fixed Last edited by AnonymousHero; February 20, 2015 at 06:26. |
![]() |
![]() |
![]() |
#65 | |
Swordsman
Join Date: May 2008
Posts: 473
![]() |
Quote:
![]() I went through the other thread and fixed the linker errors that appeared on there, and changed the names of some functions that were deprecated as recommended: open to _open fdopen tp _fdopen my_mkdir to _mkdir but I've still got a few linker errors Error 1 error LNK2019: unresolved external symbol __fopen referenced in function _file_open angband-latest\z-file.obj Error 2 error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup angband-latest\MSVCRTD.lib(crtexew.obj) |
|
![]() |
![]() |
![]() |
#66 | |
Veteran
Join Date: Jun 2007
Posts: 1,372
![]() |
Quote:
![]() |
|
![]() |
![]() |
![]() |
#67 | |
Swordsman
Join Date: Dec 2009
Location: Dallas, Texas, USA
Posts: 436
![]() |
Quote:
|
|
![]() |
![]() |
![]() |
#68 |
Swordsman
Join Date: May 2008
Posts: 473
![]() |
Ok I've managed to get a title screen! Thanks for the help. However the problems documented in this post are still happening in the current version:
http://angband.oook.cz/forum/showpos...&postcount=100 It seems to default to graphical tiles and then screw up in the png_read_info(png_ptr, info_ptr); method. I can get the game running by changing this line to skip the ReadDIB2_PNG function that crashes: if (FALSE) { // !ReadDIB2_PNG(data[0].w, buf, &infGraph, NULL, TRUE)) { plog_fmt("Cannot read file '%s'", name); return FALSE; } The game seems to run, but obviously I've commented out the graphics so you can't see any tiles (is there a way to default to ASCII?). Also looks like the look rectangle isn't getting deleted when you move it around. Last edited by TJS; February 23, 2015 at 21:38. |
![]() |
![]() |
![]() |
#69 | |
Vanilla maintainer
Join Date: Apr 2007
Location: Canberra, Australia
Age: 55
Posts: 8,671
Donated: $60
![]() |
Quote:
__________________
One for the Dark Lord on his dark throne In the Land of Mordor where the Shadows lie. |
|
![]() |
![]() |
![]() |
#70 |
Swordsman
Join Date: May 2008
Posts: 473
![]() |
Whoops sorry I suck, I read that whole thread and missed the fix from EpicMan, I've updated the above post to remove stuff that is fixed and left the stuff that's still broken.
Last edited by TJS; February 23, 2015 at 22:47. |
![]() |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Ladder restructure request | OOD Town drunk | Vanilla | 7 | April 4, 2013 17:11 |
v4 update | Magnate | v4 | 10 | December 13, 2011 14:40 |
Ladder Update | UglySquirrell | Vanilla | 2 | September 20, 2011 05:50 |
Quickband update | Antoine | Variants | 11 | March 21, 2011 02:26 |
Help me update PosBand! | pampl | Development | 20 | December 27, 2010 19:55 |