-fsanitize=address -static-libasan reports:
Score = 3
highscore = 3
state = 1
==147076==ERROR: AddressSanitizer: alloc-dealloc-mismatch (operator new vs free) on 0x506000080480
#0 0x5556e04bb1d7 in __interceptor_free (/home/alistair/Programming/C++/sidescrollingspaceshooter/OV25HSE/a.out+0x9c1d7)
#1 0x5556e050899b in doPointsPods() (/home/alistair/Programming/C++/sidescrollingspaceshooter/OV25HSE/a.out+0xe999b)
#2 0x5556e05032d1 in logic() (/home/alistair/Programming/C++/sidescrollingspaceshooter/OV25HSE/a.out+0xe42d1)
#3 0x5556e050a924 in main (/home/alistair/Programming/C++/sidescrollingspaceshooter/OV25HSE/a.out+0xeb924)
#4 0x7f3b8e48ed8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
#5 0x7f3b8e48ee3f in __libc_start_main_impl ../csu/libc-start.c:392
#6 0x5556e042b7d4 in _start (/home/alistair/Programming/C++/sidescrollingspaceshooter/OV25HSE/a.out+0xc7d4)
0x506000080480 is located 0 bytes inside of 56-byte region [0x506000080480,0x5060000804b8)
allocated by thread T0 here:
#0 0x5556e04bce87 in operator new(unsigned long) (/home/alistair/Programming/C++/sidescrollingspaceshooter/OV25HSE/a.out+0x9de87)
#1 0x5556e0508a08 in addPointsPod(int, int) (/home/alistair/Programming/C++/sidescrollingspaceshooter/OV25HSE/a.out+0xe9a08)
#2 0x5556e0504fdf in bulletHitFighter(Laser*) (/home/alistair/Programming/C++/sidescrollingspaceshooter/OV25HSE/a.out+0xe5fdf)
#3 0x5556e0504270 in doBullets() (/home/alistair/Programming/C++/sidescrollingspaceshooter/OV25HSE/a.out+0xe5270)
#4 0x5556e0503233 in logic() (/home/alistair/Programming/C++/sidescrollingspaceshooter/OV25HSE/a.out+0xe4233)
#5 0x5556e050a924 in main (/home/alistair/Programming/C++/sidescrollingspaceshooter/OV25HSE/a.out+0xeb924)
#6 0x7f3b8e48ed8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
SUMMARY: AddressSanitizer: alloc-dealloc-mismatch (/home/alistair/Programming/C++/sidescrollingspaceshooter/OV25HSE/a.out+0x9c1d7) in __interceptor_free
==147076==HINT: if you don’t care about these errors you may set ASAN_OPTIONS=alloc_dealloc_mismatch=0
==147076==ABORTING
alistair@alistair-EasyNote-TJ65:~/Programming/C++/sidescrollingspaceshooter/OV25HSE$ =================================================================
==147076==ERROR: AddressSanitizer: alloc-dealloc-mismatch (operator new vs free) on 0x506000080480
#0 0x5556e04bb1d7 in __interceptor_free (/home/alistair/Programming/C++/sidescrollingspaceshooter/OV25HSE/a.out+0x9c1d7)
#1 0x5556e050899b in doPointsPods() (/home/alistair/Programming/C++/sidescrollingspaceshooter/OV25HSE/a.out+0xe999b)
#2 0x5556e05032d1 in logic() (/home/alistair/Programming/C++/sidescrollingspaceshooter/OV25HSE/a.out+0xe42d1)
#3 0x5556e050a924 in main (/home/alistair/Programming/C++/sidescrollingspaceshooter/OV25HSE/a.out+0xeb924)
#4 0x7f3b8e48ed8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
#5 0x7f3b8e48ee3f in __libc_start_main_impl ../csu/libc-start.c:392
#6 0x5556e042b7d4 in _start (/home/alistair/Programming/C++/sidescrollingspaceshooter/OV25HSE/a.out+0xc7d4)
0x506000080480 is located 0 bytes inside of 56-byte region [0x506000080480,0x5060000804b8)
allocated by thread T0 here:
#0 0x5556e04bce87 in operator new(unsigned long) (/home/alistair/Programming/C++/sidescrollingspaceshooter/OV25HSE/a.out+0x9de87)
#1 0x5556e0508a08 in addPointsPod(int, int) (/home/alistair/Programming/C++/HSEstair@alistair-EasyNote-TJ65:~/Programming/C++/sidescrollingspaceshooter/
is it something to do with the logic changing the gamestate starting on line 119 in main.cpp?