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

stack-buffer-underflow at 3nd call op test/flow/except.pn #14

Open
rurban opened this issue Feb 25, 2013 · 0 comments
Open

stack-buffer-underflow at 3nd call op test/flow/except.pn #14

rurban opened this issue Feb 25, 2013 · 0 comments
Assignees
Labels
Milestone

Comments

@rurban
Copy link
Member

rurban commented Feb 25, 2013

-B and -X

$ ./potion -V -B test/flow/except.pn  2>&1 |less
[21] loadpn   0 3       ; 1
[22] move     1 0       ; 1
[23] loadk    0 3       ; to
[24] message  0 1       ; function(end)
[25] loadpn   2 5       ; 2
[26] proto    3 4       ; function(x)
[29] call     0 3-- run-time --
[ 1] getupval 0 0       ; function(block, catch)
[ 2] self     1 ; Lobby
[ 3] proto    2 0       ; function()
[ 6] proto    3 1       ; function(e)
[ 7] call     0 3-- run-time --
[ 1] newtuple 0 0       ; ()
[ 2] setlocal 0 2       ; ()
[ 3] self     1 ; Lobby
[ 4] loadk    0 0       ; here
[ 5] bind     0 1       ; function()
[ 6] loadpn   2 0       ; nil
[ 7] call     0 2=================================================================
==30674== ERROR: AddressSanitizer: stack-buffer-underflow on address 0x7fff7c3e39a0 at pc 0x40d876 bp 0x7fff7c3e2e60 sp 0x7fff7c3e2620
READ of size 1 at 0x7fff7c3e39a0 thread T0
    #0 0x40d875 in __interceptor_memcpy (/home/rurban/Perl/p2/p2/potion+0x40d875)
    #1 0x7fa33b13d735 in potion_callcc (./libpotion.so+0xd6735)
    #2 0x7fa33b1dae61 in potion_call /usr/src/p2/p2/core/internal.c:130
    #3 0x7fa33b272cc8 in potion_vm /usr/src/p2/p2/core/vm.c:435
    #4 0x7fa33b263630 in potion_vm_proto /usr/src/p2/p2/core/vm.c:74
    #5 0x7fa33b1f2c3a in potion_num_to /usr/src/p2/p2/core/number.c:119
    #6 0x7fa33b1db10c in potion_call /usr/src/p2/p2/core/internal.c:132
    #7 0x7fa33b272cc8 in potion_vm /usr/src/p2/p2/core/vm.c:435
    #8 0x41e4e8 in potion_cmd_compile /usr/src/p2/p2/front/potion.c:106
    #9 0x41c5f5 in main /usr/src/p2/p2/front/potion.c:240
    #10 0x7fa33a443eac (/lib/x86_64-linux-gnu/libc.so.6+0x1eeac)
Address 0x7fff7c3e39a0 is located at offset 0 in frame <potion_call> of T0's stack:
  This frame has 6 object(s):
    [32, 40) 'retval'
    [96, 104) 'P.addr'
    [160, 168) 'cl.addr'
    [224, 228) 'argc.addr'
    [288, 296) 'argv.addr'
    [352, 360) 'c'
#1  0x000000000040d8a4 in memcpy ()
#2  0x00007ffff7bf3f06 in potion_callcc () from ./libpotion.so
#3  0x00007ffff7c91652 in potion_call (P=0x7ffff7f70060, cl=140737353594048, argc=2, argv=0x7ffffffe8e00)
    at core/internal.c:130
#4  0x00007ffff7d294b9 in potion_vm (P=0x7ffff7f70060, proto=140737352523328, self=140737353581352, 
    vargs=140737352290536, upc=0, upargs=0x7ffff7e3cf30) at core/vm.c:435
#5  0x00007ffff7d19e21 in potion_vm_proto (P=0x7ffff7f70060, cl=140737352290392, self=140737353581352)
    at core/vm.c:74
#6  0x00007ffff7ca942b in potion_num_to (P=0x7ffff7f70060, cl=140737353601704, self=3, end=5, 
    block=140737352290392) at core/number.c:119
#7  0x00007ffff7c918fd in potion_call (P=0x7ffff7f70060, cl=140737353601704, argc=3, argv=0x7fffffff52e0)
    at core/internal.c:132
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant