================================================================= ==11==ERROR:…
- User
================================================================= ==11==ERROR: AddressSanitizer: heap-use-after-free on address 0x502000000010 at pc 0x000000424085 bp 0x7fff8922b0a0 sp 0x7fff8922b098 READ of size 8 at 0x502000000010 thread T0 #0 0x424084 in remove_topping_from_order(int, char const*, Order*) /vol/src/pa3.cpp:902 #1 0x42c64d in test15() /vol/src/pa3_test.cpp:456 #2 0x43d96f in main /vol/src/pa3_test.cpp:1503 #3 0x7fe79c340249 (/lib/x86_64-linux-gnu/libc.so.6+0x27249) (BuildId: 30f067a5eccdb3bdce0b9ec7638ebd86992b9c8b) #4 0x7fe79c340304 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x27304) (BuildId: 30f067a5eccdb3bdce0b9ec7638ebd86992b9c8b) #5 0x404380 in _start (/vol/src/pa3_test+0x404380) 0x502000000010 is located 0 bytes inside of 16-byte region [0x502000000010,0x502000000020) freed by thread T0 here: #0 0x7fe79cf84238 in operator delete(void*) (/usr/local/lib64/libasan.so.8+0xfb238) #1 0x423fbb in remove_topping_from_order(int, char const*, Order*) /vol/src/pa3.cpp:901 #2 0x42c64d in test15() /vol/src/pa3_test.cpp:456 #3 0x43d96f in main /vol/src/pa3_test.cpp:1503 #4 0x7fe79c340249 (/lib/x86_64-linux-gnu/libc.so.6+0x27249) (BuildId: 30f067a5eccdb3bdce0b9ec7638ebd86992b9c8b) previously allocated by thread T0 here: #0 0x7fe79cf837f8 in operator new(unsigned long) (/usr/local/lib64/libasan.so.8+0xfa7f8) #1 0x4229dd in add_topping_to_order(int, char const*, ToppingType*, Order*) /vol/src/pa3.cpp:826 #2 0x42c4da in test15() /vol/src/pa3_test.cpp:452 #3 0x43d96f in main /vol/src/pa3_test.cpp:1503 #4 0x7fe79c340249 (/lib/x86_64-linux-gnu/libc.so.6+0x27249) (BuildId: 30f067a5eccdb3bdce0b9ec7638ebd86992b9c8b) SUMMARY: AddressSanitizer: heap-use-after-free /vol/src/pa3.cpp:902 in remove_topping_from_order(int, char const*, Order*) Shadow bytes around the buggy address: 0x501ffffffd80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x501ffffffe00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x501ffffffe80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x501fffffff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x501fffffff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x502000000000: fa fa[fd]fd fa fa 00 00 fa fa 00 00 fa fa 00 00 0x502000000080: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x502000000100: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x502000000180: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x502000000200: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x502000000280: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 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 ==11==ABORTING
================================================================= ==11==ERROR: AddressSanitizer: heap-use-after-free on address 0x502000000010 at pc 0x000000424085 bp 0x7fff8922b0a0 sp 0x7fff8922b098 READ of size 8 at 0x502000000010 thread T0 #0 0x424084 in remove_topping_from_order(int, char const*, Order*) /vol/src/pa3.cpp:902 #1 0x42c64d in test15() /vol/src/pa3_test.cpp:456 #2 0x43d96f in main /vol/src/pa3_test.cpp:1503 #3 0x7fe79c340249 (/lib/x86_64-linux-gnu/libc.so.6+0x27249) (BuildId: 30f067a5eccdb3bdce0b9ec7638ebd86992b9c8b) #4 0x7fe79c340304 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x27304) (BuildId: 30f067a5eccdb3bdce0b9ec7638ebd86992b9c8b) #5 0x404380 in _start (/vol/src/pa3_test+0x404380) 0x502000000010 is located 0 bytes inside of 16-byte region [0x502000000010,0x502000000020) freed by thread T0 here: #0 0x7fe79cf84238 in operator delete(void*) (/usr/local/lib64/libasan.so.8+0xfb238) #1 0x423fbb in remove_topping_from_order(int, char const*, Order*) /vol/src/pa3.cpp:901 #2 0x42c64d in test15() /vol/src/pa3_test.cpp:456 #3 0x43d96f in main /vol/src/pa3_test.cpp:1503 #4 0x7fe79c340249 (/lib/x86_64-linux-gnu/libc.so.6+0x27249) (BuildId: 30f067a5eccdb3bdce0b9ec7638ebd86992b9c8b) previously allocated by thread T0 here: #0 0x7fe79cf837f8 in operator new(unsigned long) (/usr/local/lib64/libasan.so.8+0xfa7f8) #1 0x4229dd in add_topping_to_order(int, char const*, ToppingType*, Order*) /vol/src/pa3.cpp:826 #2 0x42c4da in test15() /vol/src/pa3_test.cpp:452 #3 0x43d96f in main /vol/src/pa3_test.cpp:1503 #4 0x7fe79c340249 (/lib/x86_64-linux-gnu/libc.so.6+0x27249) (BuildId: 30f067a5eccdb3bdce0b9ec7638ebd86992b9c8b) SUMMARY: AddressSanitizer: heap-use-after-free /vol/src/pa3.cpp:902 in remove_topping_from_order(int, char const*, Order*) Shadow bytes around the buggy address: 0x501ffffffd80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x501ffffffe00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x501ffffffe80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x501fffffff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x501fffffff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x502000000000: fa fa[fd]fd fa fa 00 00 fa fa 00 00 fa fa 00 00 0x502000000080: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x502000000100: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x502000000180: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x502000000200: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x502000000280: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 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 ==11==ABORTING
- Assistant