Error in Code
Difference between en1 and en2, changed 86 character(s)
``↵
`~~~~~`↵
`Your code here...`↵
`~~~~~`↵
``↵
``↵
~~~~~↵
Your code here...↵
~~~~~↵

While solving a  problem I encountered this error.Please do tell me about it.↵


Diagnostics detected issues [cpp.clang++-diagnose]: =================================================================↵
==3928==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x10a4f4b9 at pc 0x002d6b50 bp 0x10a4f454 sp 0x10a4f450↵
READ of size 1 at 0x10a4f4b9 thread T0↵
    #0 0x2d6b4f in main K:\ramdisk\codeforces61\084a7895c7304a4b261436133de17384\compile-ccca5514d227160def28ee6184b6a6e2\p71.cpp:166↵
    #1 0x34f7ff in __scrt_common_main_seh f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:283↵
    #2 0x7687343c in BaseThreadInitThunk+0x11 (C:\Windows\syswow64\kernel32.dll+0x1343c)↵
    #3 0x774e9831 in RtlInitializeExceptionChain+0x62 (C:\Windows\SysWOW64\ntdll.dll+0x39831)↵
    #4 0x774e9804 in RtlInitializeExceptionChain+0x35 (C:\Windows\SysWOW64\ntdll.dll+0x39804)↵

Address 0x10a4f4b9 is located in stack of thread T0 at offset 89 in frame↵
    #0 0x2d504f in main K:\ramdisk\codeforces61\084a7895c7304a4b261436133de17384\compile-ccca5514d227160def28ee6184b6a6e2\p71.cpp:124↵

  This frame has 7 object(s):↵
    [16, 20) 't' (line 127)↵
    [32, 36) 'n' (line 131)↵
    [48, 52) 'k' (line 131)↵
    [64, 88) 'a' (line 133) <== Memory access at offset 89 overflows this variable↵
    [128, 152) 'b' (line 133)↵
    [192, 300) 'ca' (line 135)↵
    [336, 444) 'cb' (line 136)↵
HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork↵
      (longjmp, SEH and C++ exceptions *are* supported)↵
SUMMARY: AddressSanitizer: stack-buffer-overflow K:\ramdisk\codeforces61\084a7895c7304a4b261436133de17384\compile-ccca5514d227160def28ee6184b6a6e2\p71.cpp:166 in main↵
Shadow bytes around the buggy address:↵
  0x32149e40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00↵
  0x32149e50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00↵
  0x32149e60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00↵
  0x32149e70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00↵
  0x32149e80: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 04 f2↵
=>0x32149e90: 04 f2 04 f2 00 00 00[f2]f2 f2 f2 f2 00 00 00 f2↵
  0x32149ea0: f2 f2 f2 f2 00 00 00 00 00 00 00 00 00 00 00 00↵
  0x32149eb0: 00 04 f2 f2 f2 f2 00 00 00 00 00 00 00 00 00 00↵
  0x32149ec0: 00 00 00 04 f3 f3 f3 f3 00 00 00 00 00 00 00 00↵
  0x32149ed0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00↵
  0x32149ee0: 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↵
==3928==ABORTING

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English hey_stalker 2020-11-26 17:57:21 86
en1 English hey_stalker 2020-11-26 17:56:37 3168 Initial revision (published)