Re: [hatari-devel] MEMWATCH freezes Hatari

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Now there are error messages when starting Hatari, and then it aborts,
see attached logs.

> Le 11/10/2018 à 12:06, Uwe Seimet a écrit :
> 
> > I did so, but it did not help with MEMWATCH and also not with ROMSPEED.
> > I get exactly the same issues as before. I attached the build log.
> > One thing has changed, though: The problem with nf_scsidrv (see the other
> > thread) is gone. And even after re-building with optimization I cannot
> > reproduce it anymore. Very strange.
> > 
> 
> I don't see anything different in your build log, I get the same warnings.
> 
> In CMakelist, could you try to add the sanitizer flags available with 
> gcc ? They should report memory leaks or similar issue if thet happen
> Add "-fsanitize=address -fsanitize=undefined" to the CMAKE_C_FLAGS
> 
> (you can check that these flags were added by running "VERBOSE=1 make")
> 
> 
INFO : Hatari v2.1.0, compiled on:  Oct 11 2018, 12:30:43
/home/us/hatari/hatari/src/cpu/readcpu.c:825:36: runtime error: shift exponent -1 is negative
/home/us/hatari/hatari/src/cpu/readcpu.c:826:36: runtime error: shift exponent -1 is negative
INFO : Mounting hard drive image '/home/us/hatari/aranym.img'
ATARI MBR:
- Partition 0: ID=.MG, start=0x00000200, size=16404.1 MB, flags=0x42 
- Partition 1: ID=.MG, start=0x0200a271, size=16404.1 MB, flags=0x42 
- Partition 2: ID=.MG, start=0x040042e3, size=16403.9 MB, flags=0x42 
- Partition 3: ID=.MG, start=0x0700e154, size=32775.6 MB, flags=0x58 
- Total size: 98308.0 MB in 0 partitions
INFO : GEMDOS HDD emulation, C: <-> /home/us/TT/C.
INFO : GEMDOS HDD emulation, D: <-> /home/us/TT/D.
INFO : GEMDOS HDD emulation, E: <-> /home/us/TT/E.
INFO : GEMDOS HDD emulation, F: <-> /home/us/TT/F.
INFO : GEMDOS HDD emulation, G: <-> /home/us/TT/G.
INFO : GEMDOS HDD emulation, H: <-> /home/us/TT/H.
INFO : GEMDOS HDD emulation, I: <-> /home/us/TT/I.
/home/us/hatari/hatari/src/cpu/maccess.h:43:9: runtime error: load of misaligned address 0x55960142cec2 for type 'uae_u32', which requires 4 byte alignment
0x55960142cec2: note: pointer points here
 51 c8  ff fc f0 39 4c 00 00 e3  65 20 f0 39 40 00 00 e3  65 28 f0 39 08 00 00 e3  65 2c f0 39 0c 00
              ^ 
/home/us/hatari/hatari/src/cpu/maccess.h:59:16: runtime error: store to misaligned address 0x55960062bbfa for type 'uae_u32', which requires 4 byte alignment
0x55960062bbfa: note: pointer points here
 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00
              ^ 
/home/us/hatari/hatari/src/cpu/maccess.h:43:9: runtime error: load of misaligned address 0x55960142b81a for type 'uae_u32', which requires 4 byte alignment
0x55960142b81a: note: pointer points here
 00 04  20 3c 00 00 08 08 4e 7b  00 02 70 00 4e 7b 08 01  4e 71 4e 71 4e 71 4e 71  4e 71 4e 71 4e 71
              ^ 
/home/us/hatari/hatari/src/cpu/maccess.h:43:9: runtime error: load of misaligned address 0x55960142b842 for type 'uae_u32', which requires 4 byte alignment
0x55960142b842: note: pointer points here
 4e 71  f3 79 00 e3 60 14 08 38  00 00 8e 09 67 2c 4d fa  00 06 60 00 0b 72 66 22  11 f8 04 24 80 01
              ^ 
/home/us/hatari/hatari/src/cpu/maccess.h:43:9: runtime error: load of misaligned address 0x55960062bbfa for type 'uae_u32', which requires 4 byte alignment
0x55960062bbfa: note: pointer points here
 00 7f  80 00 23 76 98 aa 00 00  00 00 00 00 00 00 00 02  00 00 00 00 00 00 00 00  00 00 00 00 00 00
              ^ 
INFO : OS clock ticks / second: 100
/home/us/hatari/hatari/src/cpu/maccess.h:59:16: runtime error: store to misaligned address 0x55960062bc0e for type 'uae_u32', which requires 4 byte alignment
0x55960062bc0e: note: pointer points here
 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00
             ^ 
TODO : TriggerSCC enable=0
TODO : TriggerSCC enable=0
TODO : TriggerSCC enable=0
TODO : SCC_serial_setRTS 1
TODO : SCC_serial_setDTR 1
TODO : TriggerSCC enable=0
TODO : SCC_serial_setBaud 9600
TODO : SCC_serial_setRTS 1
TODO : SCC_serial_setDTR 1
TODO : TriggerSCC enable=0
TODO : TriggerSCC enable=0
TODO : TriggerSCC enable=0
TODO : TriggerSCC enable=0
TODO : TriggerSCC enable=0
TODO : TriggerSCC enable=0
TODO : SCC_serial_setRTS 1
TODO : SCC_serial_setDTR 1
TODO : TriggerSCC enable=0
TODO : SCC_serial_setBaud 9600
TODO : SCC_serial_setRTS 1
TODO : SCC_serial_setDTR 1
TODO : TriggerSCC enable=0
TODO : TriggerSCC enable=0
TODO : TriggerSCC enable=0
TODO : TriggerSCC enable=0
/home/us/hatari/hatari/src/cpu/cpuemu_0.c:36810:31: runtime error: shift exponent 32 is too large for 32-bit type 'unsigned int'
/home/us/hatari/hatari/src/cpu/cpuemu_0.c:36820:51: runtime error: shift exponent 32 is too large for 32-bit type 'unsigned int'
/home/us/hatari/hatari/src/video.c:1122:57: runtime error: index 501 out of bounds for type 'SHIFTER_LINE [501]'
/home/us/hatari/hatari/src/video.c:1122:65: runtime error: load of address 0x5596005400fc with insufficient space for an object of type 'int'
0x5596005400fc: note: pointer points here
  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
              ^ 
=================================================================
==10448==ERROR: AddressSanitizer: global-buffer-overflow on address 0x5596005400fc at pc 0x5595f83d887d bp 0x7ffd7f22cfe0 sp 0x7ffd7f22cfd0
READ of size 4 at 0x5596005400fc thread T0
    #0 0x5595f83d887c in Video_ConvertPosition /home/us/hatari/hatari/src/video.c:1122
    #1 0x5595f83d8ebe in Video_GetPosition /home/us/hatari/hatari/src/video.c:1150
    #2 0x5595f82a6a3c in FDC_IndexPulse_Update /home/us/hatari/hatari/src/fdc.c:1540
    #3 0x5595f82a452c in FDC_UpdateAll /home/us/hatari/hatari/src/fdc.c:1247
    #4 0x5595f82a8657 in FDC_InterruptHandler_Update /home/us/hatari/hatari/src/fdc.c:1810
    #5 0x5595f84bb0b2 in m68k_run_2 /home/us/hatari/hatari/src/cpu/newcpu.c:7397
    #6 0x5595f84bca7e in m68k_go /home/us/hatari/hatari/src/cpu/newcpu.c:7719
    #7 0x5595f8343d12 in M68000_Start /home/us/hatari/hatari/src/m68000.c:313
    #8 0x5595f8349362 in main /home/us/hatari/hatari/src/main.c:949
    #9 0x7faa2eb15010 in __libc_start_main (/lib64/libc.so.6+0x21010)
    #10 0x5595f825c159 in _start (/home/us/hatari/hatari/src/hatari+0x366e159)

0x5596005400fc is located 0 bytes to the right of global variable 'ShifterFrame' defined in '/home/us/hatari/hatari/src/video.c:600:22' (0x55960053d180) of size 12156
0x5596005400fc is located 36 bytes to the left of global variable 'VideoTimings' defined in '/home/us/hatari/hatari/src/video.c:669:21' (0x559600540120) of size 1056
SUMMARY: AddressSanitizer: global-buffer-overflow /home/us/hatari/hatari/src/video.c:1122 in Video_ConvertPosition
Shadow bytes around the buggy address:
  0x0ab34009ffc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0ab34009ffd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0ab34009ffe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0ab34009fff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0ab3400a0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0ab3400a0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00[04]
  0x0ab3400a0020: f9 f9 f9 f9 00 00 00 00 00 00 00 00 00 00 00 00
  0x0ab3400a0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0ab3400a0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0ab3400a0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0ab3400a0060: 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
==10448==ABORTING


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/