Record Case Detail

Notes

This function is in beta test. Please help improve it in the issues here.

Stderr

=================================================================
==47706==ERROR: AddressSanitizer: heap-use-after-free on address 0x60400000f9d0 at pc 0x557a6f4176a0 bp 0x7ffd60cb6ba0 sp 0x7ffd60cb6b90
READ of size 4 at 0x60400000f9d0 thread T0
    #0 0x557a6f41769f in findBook_test (/out/package/ex6+0x569f)
    #1 0x557a6f416712 in main (/out/package/ex6+0x4712)
    #2 0x7f26537afb96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    #3 0x557a6f4156f9 in _start (/out/package/ex6+0x36f9)

0x60400000f9d0 is located 0 bytes inside of 40-byte region [0x60400000f9d0,0x60400000f9f8)
freed by thread T0 here:
    #0 0x7f265497e7a8 in __interceptor_free (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xde7a8)
    #1 0x557a6f415b6e in removeBook (/out/package/ex6+0x3b6e)
    #2 0x557a6f41651b in main (/out/package/ex6+0x451b)
    #3 0x7f26537afb96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)

previously allocated by thread T0 here:
    #0 0x7f265497eb40 in __interceptor_malloc (/usr/lib/x86_

Hints

Your answer may be identical to the JOJ answer in the first several lines.

However, the main problem you meet now is Runtime Error. And the exit code of your program is 1, which should be 0.

Please double check your code to solve this problem and try again.

Your Answer

Linked-List:
21724->9066->25686->26496->23337->29218->25400->26781->17893->23993->10800->30568->4514->26096->12261->30527->9218->3627->5015->20740->30336->7968->28663->17784->19209->12350->15650->28270->6313->9421->2028->15876->16728->27468->1096->17204->11325->22054->15981->7973->19479->15704->7955->6526->8633->25512->19477->4291->17695->12725->2200->19759->16312->2133->11586->6037->26877->26242->11085->23693->26208->14780->5790->30689->1223->24000->2575->277->18->14493->29826->30321->122->18048->24990->28464->27400->2091->28936->27413->66->28820->10275->26904->16344->15600->20682->16953->24169->20417->4738->18948->2438->28114->946->23982->19082->21344->4018->1425->25979->2658->21648->22898->30528->20635->22673->20764->17138->12476->13368->16309->19295->10015->265->12214->25868->7627->7624->18002->9455->9032->30495->23286->4711->20673->26365->1360->10777->23729->23778->21661->225->9764->24145->18511->28935->1815->11441->16815->16675->3353->16044->7081->4794->13285->25238->28514->29172->29591->18506->6817->24

JOJ Answer

Linked-List:
21724->9066->25686->26496->23337->29218->25400->26781->17893->23993->10800->30568->4514->26096->12261->30527->9218->3627->5015->20740->30336->7968->28663->17784->19209->12350->15650->28270->6313->9421->2028->15876->16728->27468->1096->17204->11325->22054->15981->7973->19479->15704->7955->6526->8633->25512->19477->4291->17695->12725->2200->19759->16312->2133->11586->6037->26877->26242->11085->23693->26208->14780->5790->30689->1223->24000->2575->277->18->14493->29826->30321->122->18048->24990->28464->27400->2091->28936->27413->66->28820->10275->26904->16344->15600->20682->16953->24169->20417->4738->18948->2438->28114->946->23982->19082->21344->4018->1425->25979->2658->21648->22898->30528->20635->22673->20764->17138->12476->13368->16309->19295->10015->265->12214->25868->7627->7624->18002->9455->9032->30495->23286->4711->20673->26365->1360->10777->23729->23778->21661->225->9764->24145->18511->28935->1815->11441->16815->16675->3353->16044->7081->4794->13285->25238->28514->29172->29591->18506->6817->24