Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parallel version hint stack-overflow with gcc -g3 #1

Closed
morris821028 opened this issue Nov 5, 2016 · 1 comment
Closed

parallel version hint stack-overflow with gcc -g3 #1

morris821028 opened this issue Nov 5, 2016 · 1 comment

Comments

@morris821028
Copy link
Owner

=================================================================
==28977== ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7fff1b8ec24f at pc 0x40317a bp 0x7fff1b8ac550 sp 0x7fff1b8ac548
READ of size 1 at 0x7fff1b8ec24f thread T0
    #0 0x403179 (/home/morris1028/thesis/parallel-VGLCS/unit+0x403179)
    #1 0x404cfc (/home/morris1028/thesis/parallel-VGLCS/unit+0x404cfc)
    #2 0x4017bd (/home/morris1028/thesis/parallel-VGLCS/unit+0x4017bd)
    #3 0x400e98 (/home/morris1028/thesis/parallel-VGLCS/unit+0x400e98)
    #4 0x7feda284af44 (/lib/x86_64-linux-gnu/libc-2.19.so+0x21f44)
    #5 0x400f23 (/home/morris1028/thesis/parallel-VGLCS/unit+0x400f23)
Address 0x7fff1b8ec24f is located at offset 223 in frame <test_small> of T0's stack:
  This frame has 4 object(s):
    [32, 46) 'GA'
    [96, 114) 'GB'
    [160, 168) 'A'
    [224, 234) 'B'
HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext
      (longjmp and C++ exceptions *are* supported)
Shadow bytes around the buggy address:
  0x1000637157f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x100063715800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x100063715810: 00 00 00 00 00 00 00 00 00 00 00 00 05 f4 00 00
  0x100063715820: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1
  0x100063715830: f1 f1 00 06 f4 f4 f2 f2 f2 f2 00 00 02 f4 f2 f2
=>0x100063715840: f2 f2 00 f4 f4 f4 f2 f2 f2[f2]00 02 f4 f4 00 00
  0x100063715850: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x100063715860: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x100063715870: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x100063715880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x100063715890: 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
  Heap righ redzone:     fb
  Freed Heap region:     fd
  Stack left redzone:    f1
  Stack mid redzone:     f2
  Stack right redzone:   f3
  Stack partial redzone: f4
  Stack after return:    f5
  Stack use after scope: f8
  Global redzone:        f9
  Global init order:     f6
  Poisoned by user:      f7
  ASan internal:         fe
==28977== ABORTING
@morris821028
Copy link
Owner Author

It is solved in b2e32d9. Using sharing variable instead of copy string into stack will run safely in debug mode. Otherwise, it can run release mode but not debug mode.

@morris821028 morris821028 changed the title parallel version gcc -g3 parallel version hint stack-overflow with gcc -g3 Nov 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant