[vlc-devel] [vlc-commits] commit: lua/net.c: revert [14707cbaca9fa] and fix properly ( Rafaël Carré )

Rafaël Carré rafael.carre at gmail.com
Mon May 10 21:00:10 CEST 2010


On Mon, 10 May 2010 19:24:26 +0300
"Rémi Denis-Courmont" <remi at remlab.net> wrote:

> Le lundi 10 mai 2010 18:05:41 git at videolan.org, vous avez écrit :
> > vlc | branch: master | Rafaël Carré <rafael.carre at gmail.com> | Mon
> > May 10 17:04:05 2010 +0200|
> > [087442fc1e36298dfbef018401b39d72249a17a9] | committer: Rafaël Carré
> > 
> > lua/net.c: revert [14707cbaca9fa] and fix properly
> > 
> > Always return 1 argument, but avoid pushing 0xffffffff bytes on the
> > stack Also fix vlclua_fd_read()

Hi,

> It can still crash. As an example, VLC threads have a 512kb stack on
> 32-bits Linux. Not 2 gigabytes.

It's the lua own stack : http://pgl.yoyo.org/luai/i/lua_pushlstring

Not the process stack so it won't crash.

If it still does I don't know how what's wrong, only look this far:
- lua_push*string() does allocation
- 'pushing 0xffffffff bytes on the stack' referred to vlclua_fd_read(),
  not the code I reverted. I just wanted to use the same code in both
  functions, but I guess return 0 without pushlstring would work too.

-- 
Rafaël Carré
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20100510/5cee2e3e/attachment.sig>


More information about the vlc-devel mailing list