fork download
  1. Line 67: Char 28:
  2. =================================================================
  3. ==22==ERROR: AddressSanitizer: stack-use-after-return on address 0x7fd95bd00028 at pc 0x561220a3030c bp 0x7fffb5ca0db0 sp 0x7fffb5ca0da8
  4. READ of size 8 at 0x7fd95bd00028 thread T0
  5. #0 0x561220a3030b in __ListNodeUtils__::hasCycle(ListNode*) (solution+0x19030b)
  6. #1 0x561220a23414 in void _Serializer_::serialize<ListNode>(ListNode* const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) (solution+0x183414)
  7. #2 0x561220a2562a in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> _Serializer_::serialize<ListNode>(ListNode* const&) (solution+0x18562a)
  8. #3 0x561220a0d85b in main solution.cpp:67:28
  9. #4 0x7fd95db56d8f (/lib/x86_64-linux-gnu/libc.so.6+0x29d8f) (BuildId: 490fef8403240c91833978d494d39e537409b92e)
  10. #5 0x7fd95db56e3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e3f) (BuildId: 490fef8403240c91833978d494d39e537409b92e)
  11. #6 0x56122093c974 in _start (solution+0x9c974)
  12. Address 0x7fd95bd00028 is located in stack of thread T0 at offset 40 in frame
  13. #0 0x561220a0dc8f in Solution::insertGreatestCommonDivisors(ListNode*) solution.cpp:67
  14. This frame has 1 object(s):
  15. [32, 48) 'n' (line 44) <== Memory access at offset 40 is inside this variable
  16. HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork
  17. (longjmp and C++ exceptions *are* supported)
  18. SUMMARY: AddressSanitizer: stack-use-after-return (solution+0x19030b) in __ListNodeUtils__::hasCycle(ListNode*)
  19. Shadow bytes around the buggy address:
  20. 0x7fd95bcffd80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  21. 0x7fd95bcffe00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  22. 0x7fd95bcffe80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  23. 0x7fd95bcfff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  24. 0x7fd95bcfff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  25. =>0x7fd95bd00000: f5 f5 f5 f5 f5[f5]f5 f5 f5 f5 f5 f5 f5 f5 f5 f5
  26. 0x7fd95bd00080: f5 f5 f5 f5 f5 f5 f5 f5 00 00 00 00 00 00 00 00
  27. 0x7fd95bd00100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  28. 0x7fd95bd00180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  29. 0x7fd95bd00200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  30. 0x7fd95bd00280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  31. Shadow byte legend (one shadow byte represents 8 application bytes):
  32. Addressable: 00
  33. Partially addressable: 01 02 03 04 05 06 07
  34. Heap left redzone: fa
  35. Freed heap region: fd
  36. Stack left redzone: f1
  37. Stack mid redzone: f2
  38. Stack right redzone: f3
  39. Stack after return: f5
  40. Stack use after scope: f8
  41. Global redzone: f9
  42. Global init order: f6
  43. Poisoned by user: f7
  44. Container overflow: fc
  45. Array cookie: ac
  46. Intra object redzone: bb
  47. ASan internal: fe
  48. Left alloca redzone: ca
  49. Right alloca redzone: cb
  50. ==22==ABORTING
Runtime error #stdin #stdout #stderr 0.01s 5284KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
./prog.sh: line 1: Line: command not found
./prog.sh: line 2: =================================================================: command not found
./prog.sh: line 3: ==22==ERROR:: command not found
./prog.sh: line 4: READ: command not found
./prog.sh: line 12: Address: command not found
./prog.sh: line 14: syntax error near unexpected token `('
./prog.sh: line 14: `  This frame has 1 object(s):'