Segmentation fault in lua_getlocal

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Segmentation fault in lua_getlocal

Yongheng Chen

Hi all,

 

We found an segmentation fault in lua_getlocal.

 

POC:

firsttime =

    true function foo() if firsttime then do print(debug.getlocal(3, 2 ^ 31))

        end end end print(load(foo))

 

Version 5.4.0, git hash 34affe7a63fc5d842580a9f23616d057e17dfe27

 

Best,

Yongheng And Rui

 

Sent from Mail for Windows 10

 

Reply | Threaded
Open this post in threaded view
|

Re: Segmentation fault in lua_getlocal

Roberto Ierusalimschy
>    We found an segmentation fault in lua_getlocal.
>
>  [...]

That one was easy :-)  (Overflow in -n when n is minint, in ldebug.c:205.)

Thanks for the report,

-- Roberto