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

ASAN errors due to NFA changes #846

Closed
samcv opened this issue Apr 25, 2018 · 1 comment
Closed

ASAN errors due to NFA changes #846

samcv opened this issue Apr 25, 2018 · 1 comment
Assignees

Comments

@samcv
Copy link
Member

samcv commented Apr 25, 2018

~/g/p/nqp ❯❯❯ nqp t/nqp/106-unicodenames.t
=================================================================
==18627==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x618000005ba8 at pc 0x7f75180e985d bp 0x7ffe7a3e4d70 sp 0x7ffe7a3e4d68
READ of size 4 at 0x618000005ba8 thread T0
    #0 0x7f75180e985c in nqp_nfa_run (//home/samantha/perl6/lib/libmoar.so+0xa7485c)
    #1 0x7f75180e6743 in MVM_nfa_run_proto (//home/samantha/perl6/lib/libmoar.so+0xa71743)
    #2 0x7f7513d07e74  (<unknown module>)

0x618000005ba8 is located 16 bytes to the right of 792-byte region [0x618000005880,0x618000005b98)
allocated by thread T0 here:
    #0 0x4bcd23 in malloc /var/tmp/portage/sys-libs/compiler-rt-sanitizers-6.0.0/work/compiler-rt-6.0.0.src/lib/asan/asan_malloc_linux.cc:88:3
    #1 0x7f7518019025 in MVM_fixed_size_alloc (//home/samantha/perl6/lib/libmoar.so+0x9a4025)
    #2 0x7f75180e6416 in sort_states_and_add_synth_cp_node (//home/samantha/perl6/lib/libmoar.so+0xa71416)
    #3 0x7f75180e5e0a in MVM_nfa_from_statelist (//home/samantha/perl6/lib/libmoar.so+0xa70e0a)
    #4 0x7f7517faa206 in MVM_interp_run (//home/samantha/perl6/lib/libmoar.so+0x935206)
    #5 0x7f751827a586 in MVM_vm_run_file (//home/samantha/perl6/lib/libmoar.so+0xc05586)
    #6 0x4eaff1 in main (/home/samantha/perl6/bin/moar+0x4eaff1)
    #7 0x7f751656c64c in __libc_start_main (/lib64/libc.so.6+0x2064c)

SUMMARY: AddressSanitizer: heap-buffer-overflow (//home/samantha/perl6/lib/libmoar.so+0xa7485c) in nqp_nfa_run
Shadow bytes around the buggy address:
  0x0c307fff8b20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c307fff8b30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c307fff8b40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c307fff8b50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c307fff8b60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c307fff8b70: 00 00 00 fa fa[fa]fa fa fa fa fa fa fa fa fa fa
  0x0c307fff8b80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c307fff8b90: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c307fff8ba0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c307fff8bb0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c307fff8bc0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
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
==18627==ABORTING
@lizmat
Copy link
Contributor

lizmat commented Apr 25, 2018

@jnthn jnthn closed this as completed in 1b78b04 Apr 26, 2018
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

3 participants