vietdu91 / 42_cub3d_Les_Aventures_de_Peppa_Pig_2_Super_3D

"If it bleeds 🩸, we can kill it 💀 !"
1 stars 0 forks source link

Segfault en mode dark #1

Open Nyfero opened 2 years ago

Nyfero commented 2 years ago

Si tu prends la grande map big couloir en mode dark et que tu regardes l'ennemie tu as un segfault quand tu t'approches. Rapport de fsanitize:

AddressSanitizer:DEADLYSIGNAL

==33963==ERROR: AddressSanitizer: SEGV on unknown address 0x631ffffff07c (pc 0x0000004e5d29 bp 0x7ffdc0d88be0 sp 0x7ffdc0d88b90 T0) ==33963==The signal is caused by a READ memory access.

0 0x4e5d29 in store_color /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/sprites/sprites_draw.c:48:10

#1 0x4e6267 in store_color_in_buffer /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/sprites/sprites_draw.c:70:13
#2 0x4e8c3e in sprite_projection /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/sprites/sprites.c:53:2
#3 0x4e8d22 in sprite_casting /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/sprites/sprites.c:67:2
#4 0x4c89c4 in game_impression /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/main.c:18:3
#5 0x4c934a in game_running /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/main.c:59:10
#6 0x4ee16c in mlx_loop (/mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/cub3D+0x4ee16c)
#7 0x4d620b in to_the_house_of_butcher /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/game/transformation.c:38:2
#8 0x4d30d3 in key_press /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/game/keys.c:66:3
#9 0x4ee1c5 in mlx_loop (/mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/cub3D+0x4ee1c5)
#10 0x4ca2b4 in game_start /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/main.c:84:2
#11 0x4d2923 in key_press_two /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/game/keys.c:43:3
#12 0x4d3237 in key_press /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/game/keys.c:70:10
#13 0x4ee1c5 in mlx_loop (/mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/cub3D+0x4ee1c5)
#14 0x4d22ee in credit_of_game /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/game/introduction.c:32:2
#15 0x4d2894 in key_press_two /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/game/keys.c:41:3
#16 0x4d3237 in key_press /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/game/keys.c:70:10
#17 0x4ee1c5 in mlx_loop (/mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/cub3D+0x4ee1c5)
#18 0x4d20de in introduction_of_game /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/game/introduction.c:22:2
#19 0x4ca55a in main /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/main.c:105:3
#20 0x7fd29b76e082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
#21 0x41c5fd in _start (/mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/cub3D+0x41c5fd)

AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/sprites/sprites_draw.c:48:10 in store_color ==33963==ABORTING

Un deuxieme sur la map peppa en dark mode toujours :)

================================================================= ==35478==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6320000005a4 at pc 0x0000004e5d25 bp 0x7ffdf783d430 sp 0x7ffdf783d428 READ of size 4 at 0x6320000005a4 thread T0

0 0x4e5d24 in store_color /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/sprites/sprites_draw.c:48:10

#1 0x4e6267 in store_color_in_buffer /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/sprites/sprites_draw.c:70:13
#2 0x4e8c3e in sprite_projection /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/sprites/sprites.c:53:2
#3 0x4e8d22 in sprite_casting /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/sprites/sprites.c:67:2
#4 0x4c89c4 in game_impression /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/main.c:18:3
#5 0x4c934a in game_running /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/main.c:59:10
#6 0x4ee16c in mlx_loop (/mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/cub3D+0x4ee16c)
#7 0x4d620b in to_the_house_of_butcher /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/game/transformation.c:38:2
#8 0x4d30d3 in key_press /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/game/keys.c:66:3
#9 0x4ee1c5 in mlx_loop (/mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/cub3D+0x4ee1c5)
#10 0x4ca2b4 in game_start /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/main.c:84:2
#11 0x4d2923 in key_press_two /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/game/keys.c:43:3
#12 0x4d3237 in key_press /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/game/keys.c:70:10
#13 0x4ee1c5 in mlx_loop (/mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/cub3D+0x4ee1c5)
#14 0x4d22ee in credit_of_game /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/game/introduction.c:32:2
#15 0x4d2894 in key_press_two /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/game/keys.c:41:3
#16 0x4d3237 in key_press /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/game/keys.c:70:10
#17 0x4ee1c5 in mlx_loop (/mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/cub3D+0x4ee1c5)
#18 0x4d20de in introduction_of_game /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/game/introduction.c:22:2
#19 0x4ca55a in main /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/main.c:105:3
#20 0x7fd1be9f6082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
#21 0x41c5fd in _start (/mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/cub3D+0x41c5fd)

0x6320000005a4 is located 604 bytes to the left of 90000-byte region [0x632000000800,0x632000016790) allocated by thread T0 here:

0 0x49785d in malloc (/mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/cub3D+0x49785d)

#1 0x4d9a49 in cub_init_sprites /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/init/init_structs2.c:42:24
#2 0x4da139 in init_sprites /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/init/init_structs2.c:75:2
#3 0x4d9607 in init_struct /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/init/init_structs.c:86:2
#4 0x4ca2f3 in main /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/main.c:95:10
#5 0x7fd1be9f6082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16

SUMMARY: AddressSanitizer: heap-buffer-overflow /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/sprites/sprites_draw.c:48:10 in store_color Shadow bytes around the buggy address: 0x0c647fff8060: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c647fff8070: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c647fff8080: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c647fff8090: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c647fff80a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x0c647fff80b0: fa fa fa fa[fa]fa fa fa fa fa fa fa fa fa fa fa 0x0c647fff80c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c647fff80d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c647fff80e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c647fff80f0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c647fff8100: 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 ==35478==ABORTING

Peut etre voir les couleurs de l'ennemie ?

Nyfero commented 2 years ago

Erreur avec fsanitize si tu ouvres cub3D avec une erreur de map :

AddressSanitizer:DEADLYSIGNAL

==34140==ERROR: AddressSanitizer: SEGV on unknown address (pc 0x0000004efb30 bp 0xbebebebebebebebe sp 0x7fff91e59ba0 T0) ==34140==The signal is caused by a READ memory access. ==34140==Hint: this fault was caused by a dereference of a high value address (see register values below). Disassemble the provided pc to learn which register was used.

0 0x4efb30 in mlx_destroy_image (/mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/cub3D+0x4efb30)

#1 0x4cea0e in free_img /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/free/free_img.c:26:3
#2 0x4ce1e9 in free_all /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/free/free.c:20:2
#3 0x4cdfc6 in print_error_and_exit /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/errors/print_error.c:25:2
#4 0x4cb051 in check_extension_cub /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/check/check_file.c:44:11
#5 0x4ca3fa in main /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/main.c:99:3
#6 0x7fd092d73082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
#7 0x41c5fd in _start (/mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/cub3D+0x41c5fd)

AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV (/mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/cub3D+0x4efb30) in mlx_destroy_image ==34140==ABORTING

Puis valgrind aussi

AddressSanitizer:DEADLYSIGNAL

==35697==ERROR: AddressSanitizer: SEGV on unknown address (pc 0x0000004efb30 bp 0xbebebebebebebebe sp 0x7ffd5405aaa0 T0) ==35697==The signal is caused by a READ memory access. ==35697==Hint: this fault was caused by a dereference of a high value address (see register values below). Disassemble the provided pc to learn which register was used.

0 0x4efb30 in mlx_destroy_image (/mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/cub3D+0x4efb30)

#1 0x4cea0e in free_img /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/free/free_img.c:26:3
#2 0x4ce1e9 in free_all /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/free/free.c:20:2
#3 0x4cdfc6 in print_error_and_exit /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/errors/print_error.c:25:2
#4 0x4cb051 in check_extension_cub /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/check/check_file.c:44:11
#5 0x4ca3fa in main /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/main.c:99:3
#6 0x7fcfccee0082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
#7 0x41c5fd in _start (/mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/cub3D+0x41c5fd)

AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV (/mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/cub3D+0x4efb30) in mlx_destroy_image ==35697==ABORTING e1r4p19% vim Makefile e1r4p19% valgrind ./cub3D maps ==36063== Memcheck, a memory error detector ==36063== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==36063== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info ==36063== Command: ./cub3D maps ==36063== ==36063==Shadow memory range interleaves with an existing memory mapping. ASan cannot proceed correctly. ABORTING. ==36063==ASan shadow was supposed to be located in the [0x00007fff7000-0x10007fff7fff] range. ==36063==This might be related to ELF_ET_DYN_BASE change in Linux 4.12. ==36063==See https://github.com/google/sanitizers/issues/856 for possible workarounds. ==36063==Process memory map follows: 0x000000400000-0x00000041c000 /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/cub3D 0x00000041c000-0x0000004f0000 /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/cub3D 0x0000004f0000-0x000000526000 /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/cub3D 0x000000527000-0x000000528000 /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/cub3D 0x000000528000-0x000000530000 /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/cub3D 0x000000530000-0x000000dd6000
0x000004000000-0x000004001000 /usr/lib/x86_64-linux-gnu/ld-2.31.so 0x000004001000-0x000004024000 /usr/lib/x86_64-linux-gnu/ld-2.31.so 0x000004024000-0x00000402c000 /usr/lib/x86_64-linux-gnu/ld-2.31.so 0x00000402c000-0x00000402d000
0x00000402d000-0x00000402e000 /usr/lib/x86_64-linux-gnu/ld-2.31.so 0x00000402e000-0x00000402f000 /usr/lib/x86_64-linux-gnu/ld-2.31.so 0x00000402f000-0x000004030000
0x000004030000-0x000004031000
0x000004830000-0x000004831000 /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_core-amd64-linux.so 0x000004831000-0x000004832000 /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_core-amd64-linux.so 0x000004832000-0x000004833000 /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_core-amd64-linux.so 0x000004833000-0x000004834000 /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_core-amd64-linux.so 0x000004834000-0x000004835000 /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_core-amd64-linux.so 0x000004835000-0x000004837000
0x000004837000-0x00000483b000 /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so 0x00000483b000-0x000004845000 /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so 0x000004845000-0x000004848000 /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so 0x000004848000-0x000004849000 /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so 0x000004849000-0x00000484a000 /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so 0x00000484a000-0x000004865000
0x000004867000-0x000004868000 /usr/lib/x86_64-linux-gnu/libdl-2.31.so 0x000004868000-0x00000486a000 /usr/lib/x86_64-linux-gnu/libdl-2.31.so 0x00000486a000-0x00000486b000 /usr/lib/x86_64-linux-gnu/libdl-2.31.so 0x00000486b000-0x00000486c000 /usr/lib/x86_64-linux-gnu/libdl-2.31.so 0x00000486c000-0x00000486d000 /usr/lib/x86_64-linux-gnu/libdl-2.31.so 0x00000486d000-0x00000487a000 /usr/lib/x86_64-linux-gnu/libm-2.31.so 0x00000487a000-0x000004921000 /usr/lib/x86_64-linux-gnu/libm-2.31.so 0x000004921000-0x0000049ba000 /usr/lib/x86_64-linux-gnu/libm-2.31.so 0x0000049ba000-0x0000049bb000 /usr/lib/x86_64-linux-gnu/libm-2.31.so 0x0000049bb000-0x0000049bc000 /usr/lib/x86_64-linux-gnu/libm-2.31.so 0x0000049bc000-0x0000049c0000 /usr/lib/x86_64-linux-gnu/libXext.so.6.4.0 0x0000049c0000-0x0000049cb000 /usr/lib/x86_64-linux-gnu/libXext.so.6.4.0 0x0000049cb000-0x0000049cf000 /usr/lib/x86_64-linux-gnu/libXext.so.6.4.0 0x0000049cf000-0x0000049d0000 /usr/lib/x86_64-linux-gnu/libXext.so.6.4.0 0x0000049d0000-0x0000049d1000 /usr/lib/x86_64-linux-gnu/libXext.so.6.4.0 0x0000049d1000-0x0000049e9000 /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0 0x0000049e9000-0x000004a74000 /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0 0x000004a74000-0x000004b08000 /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0 0x000004b08000-0x000004b09000 /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0 0x000004b09000-0x000004b0a000 /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0 0x000004b0a000-0x000004b0e000 /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0 0x000004b0e000-0x000004b14000 /usr/lib/x86_64-linux-gnu/libpthread-2.31.so 0x000004b14000-0x000004b25000 /usr/lib/x86_64-linux-gnu/libpthread-2.31.so 0x000004b25000-0x000004b2b000 /usr/lib/x86_64-linux-gnu/libpthread-2.31.so 0x000004b2b000-0x000004b2c000 /usr/lib/x86_64-linux-gnu/libpthread-2.31.so 0x000004b2c000-0x000004b2d000 /usr/lib/x86_64-linux-gnu/libpthread-2.31.so 0x000004b2d000-0x000004b33000
0x000004b33000-0x000004b35000 /usr/lib/x86_64-linux-gnu/librt-2.31.so 0x000004b35000-0x000004b39000 /usr/lib/x86_64-linux-gnu/librt-2.31.so 0x000004b39000-0x000004b3b000 /usr/lib/x86_64-linux-gnu/librt-2.31.so 0x000004b3b000-0x000004b3c000 /usr/lib/x86_64-linux-gnu/librt-2.31.so 0x000004b3c000-0x000004b3d000 /usr/lib/x86_64-linux-gnu/librt-2.31.so 0x000004b3d000-0x000004b40000 /usr/lib/x86_64-linux-gnu/libgcc_s.so.1 0x000004b40000-0x000004b52000 /usr/lib/x86_64-linux-gnu/libgcc_s.so.1 0x000004b52000-0x000004b56000 /usr/lib/x86_64-linux-gnu/libgcc_s.so.1 0x000004b56000-0x000004b57000 /usr/lib/x86_64-linux-gnu/libgcc_s.so.1 0x000004b57000-0x000004b58000 /usr/lib/x86_64-linux-gnu/libgcc_s.so.1 0x000004b58000-0x000004b7a000 /usr/lib/x86_64-linux-gnu/libc-2.31.so 0x000004b7a000-0x000004cf2000 /usr/lib/x86_64-linux-gnu/libc-2.31.so 0x000004cf2000-0x000004d40000 /usr/lib/x86_64-linux-gnu/libc-2.31.so 0x000004d40000-0x000004d44000 /usr/lib/x86_64-linux-gnu/libc-2.31.so 0x000004d44000-0x000004d46000 /usr/lib/x86_64-linux-gnu/libc-2.31.so 0x000004d46000-0x000004d4a000
0x000004d4a000-0x000004d55000 /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0 0x000004d55000-0x000004d69000 /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0 0x000004d69000-0x000004d72000 /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0 0x000004d72000-0x000004d73000 /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0 0x000004d73000-0x000004d74000 /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0 0x000004d74000-0x000004d75000 /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0 0x000004d75000-0x000004d77000 /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0 0x000004d77000-0x000004d78000 /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0 0x000004d78000-0x000004d79000 /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0 0x000004d79000-0x000004d7a000 /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0 0x000004d7a000-0x000004d7c000
0x000004d7c000-0x000004d7e000 /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0 0x000004d7e000-0x000004d80000 /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0 0x000004d80000-0x000004d82000 /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0 0x000004d82000-0x000004d83000 /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0 0x000004d83000-0x000004d84000 /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0 0x000004d84000-0x000004d88000 /usr/lib/x86_64-linux-gnu/libbsd.so.0.10.0 0x000004d88000-0x000004d97000 /usr/lib/x86_64-linux-gnu/libbsd.so.0.10.0 0x000004d97000-0x000004d9a000 /usr/lib/x86_64-linux-gnu/libbsd.so.0.10.0 0x000004d9a000-0x000004d9b000 /usr/lib/x86_64-linux-gnu/libbsd.so.0.10.0 0x000004d9b000-0x000004d9c000 /usr/lib/x86_64-linux-gnu/libbsd.so.0.10.0 0x000004d9c000-0x000004d9d000 /usr/lib/x86_64-linux-gnu/libbsd.so.0.10.0 0x000004d9d000-0x0000050f2000
0x0000050f2000-0x0000054f2000
0x0000054f2000-0x0000054f6000
0x000058000000-0x000058001000 /usr/lib/x86_64-linux-gnu/valgrind/memcheck-amd64-linux 0x000058001000-0x0000581f6000 /usr/lib/x86_64-linux-gnu/valgrind/memcheck-amd64-linux 0x0000581f6000-0x000058294000 /usr/lib/x86_64-linux-gnu/valgrind/memcheck-amd64-linux 0x000058294000-0x00005829a000 /usr/lib/x86_64-linux-gnu/valgrind/memcheck-amd64-linux 0x00005829a000-0x000059c9d000
0x001002001000-0x001002c16000
0x001002c8c000-0x001002cb0000
0x001002cb0000-0x001002cb2000
0x001002cb2000-0x001002db2000
0x001002db2000-0x001002db4000
0x001002db4000-0x001002db5000 /tmp/vgdb-pipe-shared-mem-vgdb-36063-by-gsap-on-??? 0x001002db5000-0x001004f01000
0x001005075000-0x001005375000
0x001005481000-0x001005681000
0x001006450000-0x001006550000
0x001006745000-0x001006985000
0x001ffeffe000-0x001fff001000
0x7ffcf678d000-0x7ffcf67ae000 [stack] 0x7ffcf67bb000-0x7ffcf67be000 [vvar] 0xffffffffff600000-0xffffffffff601000 [vsyscall] ==36063==End of process memory map. ==36063== ==36063== HEAP SUMMARY: ==36063== in use at exit: 0 bytes in 0 blocks ==36063== total heap usage: 14 allocs, 14 frees, 580 bytes allocated ==36063== ==36063== All heap blocks were freed -- no leaks are possible ==36063== ==36063== For lists of detected and suppressed errors, rerun with: -s ==36063== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

Je pense que tu dois quitter ton programme plus tot si jamais tu as une erreur de parsing/fichier

vietdu91 commented 2 years ago

Oooohh merciii pour ce checking de qualité !


De : Gaëtan SAP @.> Envoyé : mardi 12 juillet 2022 18:24 À : vietdu91/42_cub3d_ongoing @.> Cc : Subscribed @.***> Objet : Re: [vietdu91/42_cub3d_ongoing] Segfault en mode dark (Issue #1)

Erreur avec fsanitize si tu ouvres cub3D avec un dossier en parametre :

AddressSanitizer:DEADLYSIGNAL

==34140==ERROR: AddressSanitizer: SEGV on unknown address (pc 0x0000004efb30 bp 0xbebebebebebebebe sp 0x7fff91e59ba0 T0) ==34140==The signal is caused by a READ memory access. ==34140==Hint: this fault was caused by a dereference of a high value address (see register values below). Disassemble the provided pc to learn which register was used.

0 0x4efb30 in mlx_destroy_image (/mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/cub3D+0x4efb30)

1https://github.com/vietdu91/42_cub3d_ongoing/issues/1 0x4cea0e in free_img /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/free/free_img.c:26:3

2 0x4ce1e9 in free_all /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/free/free.c:20:2

3 0x4cdfc6 in print_error_and_exit /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/errors/print_error.c:25:2

4 0x4cb051 in check_extension_cub /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/check/check_file.c:44:11

5 0x4ca3fa in main /mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/srcs/main.c:99:3

6 0x7fd092d73082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16

7 0x41c5fd in _start (/mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/cub3D+0x41c5fd)

AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV (/mnt/nfs/homes/gsap/Documents/in_progress/cub3d_Manu_Dim/cub3D+0x4efb30) in mlx_destroy_image ==34140==ABORTING

— Reply to this email directly, view it on GitHubhttps://github.com/vietdu91/42_cub3d_ongoing/issues/1#issuecomment-1181982270, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASXISSJ6XUY55MXEJC5DNHDVTWL4VANCNFSM53LS57FA. You are receiving this because you are subscribed to this thread.Message ID: @.***>