Re: [hatari-devel] memory setup segfault |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] memory setup segfault
- From: Laurent Sallafranque <laurent.sallafranque@xxxxxxx>
- Date: Mon, 6 Nov 2023 23:27:00 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=free.fr; s=smtp-20201208; t=1699309621; bh=QHNkXGyBNNtuqW3U4nRJ+D+NPuj/OLdm0jmZ+cbSwiE=; h=Date:Subject:To:References:From:In-Reply-To:From; b=o2YmonrAhidnZv074RA0l1Xw4/mRtyznhTlYQ80TuRPT5ZaZtUylkZhXHG9u4eqXZ mcBMtG4RT4QS8aDsgIimdEeLvH0oNWjCx8V6rZVGvY9zhgG1Aw9HRI4si1rvse/P0z DQEN/jDAkmHX/h16m9BC4qBBExdsk8QJQd8xVubPXnyRDk8xXVs3+Qw9HKfgxgeFXC j5w8FhWFvGVYjQq9v6lJjE+NCHej887bMxvCKWhiyOiGFFYUmbMCog0Tf4zd5dYdDl e1+VkKGaiG6tEuVv9Ze+XA7ATtKOpjA1LcK//XknBD0FsKkpaoHjfaJmTeSTBUBK3k svN7K2VxVuJSw==
Does this helps ?
Don't hesitate to tell me to do some more tests.
I've never found libasan for ubuntu.
laurent@laurent-Gamer:~/Atari/hatari/build/src$ ./hatari
DEBUG: Video_SetSystemTimings 5 3 -> 2 (WS3) 503 503 64
INFO : Hatari v2.5.0-devel (Nov 6 2023), compiled on: Nov 6 2023,
23:23:14
DEBUG: Video_SetSystemTimings 5 3 -> 2 (WS3) 503 503 64
DEBUG: Configured max Hatari resolution = 832x588, optimal for ST =
832x552(+36)
DEBUG: update cyc speed 0 throttle 0.000000 clock_mult 512
DEBUG: CPU cycleunit: 256 (0.500)
DEBUG: 1872 CPU functions
DEBUG: ACSI: 0, SCSI: 0, IDE: 0 - GEMDOS skipping 0 partitions.
DEBUG: Checking GEMDOS C: HDD:
/media/Toshiba/Data_Laurent/Jeux/Atari/DiskDur.FAL
INFO : GEMDOS HDD emulation, C: <->
/media/Toshiba/Data_Laurent/Jeux/Atari/DiskDur.FAL.
DEBUG: memory_map_Standard_RAM total=14680064 ram0=0 ram1=0 mmu0=131072
mmu1=131072
DEBUG: Loaded TOS version 4.04, starting at $e00000, country code = 127, PAL
DEBUG: Applying TOS patch 'disable PMMU access'.
2 repeats of: DEBUG: Applying TOS patch 'disable PMMU access'.
DEBUG: Applying TOS patch 'ROM checksum'.
DEBUG: Applying TOS patch 'boot from DMA bus'.
DEBUG: Applying TOS patch 'boot from DMA bus'.
DEBUG: Skipped patch 'replace code for 68040'.
8 repeats of: DEBUG: Skipped patch 'replace code for 68040'.
16 repeats of: DEBUG: Skipped patch 'replace code for 68040'.
2 repeats of: DEBUG: Skipped patch 'replace code for 68040'.
DEBUG: Skipped patch 'replace code for 68060'.
8 repeats of: DEBUG: Skipped patch 'replace code for 68060'.
16 repeats of: DEBUG: Skipped patch 'replace code for 68060'.
6 repeats of: DEBUG: Skipped patch 'replace code for 68060'.
DEBUG: Applying TOS patch 'enable extra TT RAM on Falcon'.
DEBUG: Applying TOS patch 'enable extra TT RAM on Falcon'.
DEBUG: Applied 8 TOS patches, 0 patches failed.
DEBUG: Video_SetSystemTimings 5 3 -> 2 (WS3) 503 503 64
DEBUG: Video_SetSystemTimings 5 3 -> 2 (WS3) 503 503 64
DEBUG: SCSI BUS reset
DEBUG: Microphone_Start: freq = 50066
DEBUG: Host system has accurate delays. (1)
DEBUG: update cyc speed 0 throttle 0.000000 clock_mult 512
DEBUG: CPU cycleunit: 256 (0.500)
DEBUG: Building CPU, 45926 opcodes (3 -2 1)
DEBUG: CPU=68030, FPU=68882 (host 64b), MMU=0, JIT=0.
DEBUG: ~cycle-exact
DEBUG: no unimplemented floating point instructions
DEBUG: 24-bit
DEBUG:
DEBUG: update cyc speed 0 throttle 0.000000 clock_mult 512
DEBUG: CPU cycleunit: 256 (0.500)
DEBUG: hardreset, memory cleared
DEBUG: m68k_run_2ce
DEBUG: CPU reset PC=e00038 (ROM memory)..
DEBUG: memory_map_Standard_RAM total=14680064 ram0=0 ram1=0 mmu0=0 mmu1=0
DEBUG: SDL2 window event: 0x1
DEBUG: SDL2 window event: 0x2
DEBUG: SDL2 window event: 0x1
DEBUG: SDL2 window event: 0x4
DEBUG: SDL2 window event: 0xa
DEBUG: SDL2 window event: 0xc
DEBUG: SDL2 window event: 0xf
DEBUG: SDL2 window event: 0x6
DEBUG: SDL2 window event: 0x5
DEBUG: SDL2 window event: 0x3
WARN : Bus Error reading at address $ffff8e09, PC=$e02cde addr_e3=e02cde
op_e3=4a38
DEBUG: Calling DSP_Reset?
DEBUG: SDL2 window event: 0x6
DEBUG: SDL2 window event: 0x3
DEBUG: SCSI BUS reset
DEBUG: SDL2 window event: 0xb
DEBUG: SDL2 window event: 0xf
DEBUG: SDL2 window event: 0xf
DEBUG: SDL2 window event: 0x4
8 repeats of: DEBUG: SDL2 window event: 0x4
10 repeats of: DEBUG: SDL2 window event: 0x4
DEBUG: SDL2 window event: 0xa
DEBUG: raw_scsi: selected scsi id mask (01)
DEBUG: raw_scsi: selected non-existing id 0
2 repeats of: DEBUG: raw_scsi: selected non-existing id 0
DEBUG: raw_scsi: selected scsi id mask (02)
DEBUG: raw_scsi: selected non-existing id 1
2 repeats of: DEBUG: raw_scsi: selected non-existing id 1
DEBUG: raw_scsi: selected scsi id mask (04)
DEBUG: raw_scsi: selected non-existing id 2
2 repeats of: DEBUG: raw_scsi: selected non-existing id 2
DEBUG: raw_scsi: selected scsi id mask (08)
DEBUG: raw_scsi: selected non-existing id 3
2 repeats of: DEBUG: raw_scsi: selected non-existing id 3
DEBUG: raw_scsi: selected scsi id mask (10)
DEBUG: raw_scsi: selected non-existing id 4
2 repeats of: DEBUG: raw_scsi: selected non-existing id 4
DEBUG: raw_scsi: selected scsi id mask (20)
DEBUG: raw_scsi: selected non-existing id 5
2 repeats of: DEBUG: raw_scsi: selected non-existing id 5
DEBUG: STMemory_RAM_SetBankSize total=1024 KB bank0=512 KB bank1=512 KB
MMU=5
DEBUG: Video_SetSystemTimings 0 3 -> 2 (WS3) 503 503 64
DEBUG: memory_map_Standard_RAM total=1048576 ram0=524288 ram1=524288
mmu0=0 mmu1=0
DEBUG: memory_map_Standard_RAM - enable MMU 1048576 0 0
=================================================================
==22449==ERROR: AddressSanitizer: global-buffer-overflow on address
0x55a0fb508880 at pc 0x55a0f8a43749 bp 0x7ffd0cc7a4e0 sp 0x7ffd0cc7a4d0
WRITE of size 1 at 0x55a0fb508880 thread T0
#0 0x55a0f8a43748 in map_banks2
/home/laurent/Atari/hatari/src/cpu/memory.c:1959
#1 0x55a0f8a43748 in map_banks_ce
/home/laurent/Atari/hatari/src/cpu/memory.c:1988
#2 0x55a0f8a43748 in memory_map_Standard_RAM
/home/laurent/Atari/hatari/src/cpu/memory.c:1614
#3 0x55a0f8a43ba4 in memory_init
/home/laurent/Atari/hatari/src/cpu/memory.c:1748
#4 0x55a0f89032eb in TOS_InitImage
/home/laurent/Atari/hatari/src/tos.c:1135
#5 0x55a0f88d3212 in Reset_ST /home/laurent/Atari/hatari/src/reset.c:61
#6 0x55a0f881d9d6 in Change_CopyChangedParamsToConfiguration
/home/laurent/Atari/hatari/src/change.c:504
#7 0x55a0f88257b4 in Dialog_DoProperty
/home/laurent/Atari/hatari/src/dialog.c:70
#8 0x55a0f88f52b4 in ShortCut_ActKey
/home/laurent/Atari/hatari/src/shortcut.c:297
#9 0x55a0f891b16a in Video_InterruptHandler_VBL
/home/laurent/Atari/hatari/src/video.c:4630
#10 0x55a0f89e89b8 in CycInt_Process_stop
/home/laurent/Atari/hatari/src/includes/cycInt.h:92
#11 0x55a0f89e89b8 in m68k_run_2ce
/home/laurent/Atari/hatari/src/cpu/newcpu.c:7013
#12 0x55a0f89e3571 in m68k_go
/home/laurent/Atari/hatari/src/cpu/newcpu.c:7798
#13 0x55a0f87f034f in main /home/laurent/Atari/hatari/src/main.c:983
#14 0x7fbaf2429d8f in __libc_start_call_main
.../sysdeps/nptl/libc_start_call_main.h:58
#15 0x7fbaf2429e3f in __libc_start_main_impl ../csu/libc-start.c:392
#16 0x55a0f87f2c54 in _start
(/home/laurent/Atari/hatari/build/src/hatari+0x254c54)
0x55a0fb508880 is located 32 bytes to the left of global variable
'TTmem_mask' defined in
'/home/laurent/Atari/hatari/src/cpu/memory.c:41:16' (0x55a0fb5088a0) of
size 4
0x55a0fb508880 is located 0 bytes to the right of global variable
'ce_banktype' defined in
'/home/laurent/Atari/hatari/src/cpu/memory.c:114:8' (0x55a0fb4f8880) of
size 65536
SUMMARY: AddressSanitizer: global-buffer-overflow
/home/laurent/Atari/hatari/src/cpu/memory.c:1959 in map_banks2
Shadow bytes around the buggy address:
0x0ab49f6990c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0ab49f6990d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0ab49f6990e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0ab49f6990f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0ab49f699100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0ab49f699110:[f9]f9 f9 f9 04 f9 f9 f9 f9 f9 f9 f9 04 f9 f9 f9
0x0ab49f699120: f9 f9 f9 f9 04 f9 f9 f9 f9 f9 f9 f9 04 f9 f9 f9
0x0ab49f699130: f9 f9 f9 f9 00 00 00 00 04 f9 f9 f9 f9 f9 f9 f9
0x0ab49f699140: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0ab49f699150: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0ab49f699160: 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
Shadow gap: cc
==22449==ABORTING
laurent@laurent-Gamer:~/Atari/hatari/build/src$