NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: PR/52226 CVS commit: src/sys/modules/lua
The following reply was made to PR kern/52226; it has been noted by GNATS.
From: Alexander Mihalicyn <alexander%mihalicyn.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: PR/52226 CVS commit: src/sys/modules/lua
Date: Sat, 20 May 2017 17:27:00 +0300
Hello, Dear Marc Balmer,
I checked out variant of fix from CVS. Sorry, but it is fully correct?
I would like to point that it's very important that in our original
fix checking of module already loaded in state was between
luaL_requiref call and md->refcount++. But in our last fix (from CVS)
we have that check before luaL_requiref. It seems that this may cause
a problem:
consider the following example:
----
luactl create s1
luactl load s1 /root/test.lua
luactl load s1 /root/test.lua
luactl destroy s1
test.lua:
systm = require 'systm'
systm.print("hello, kernel world!\n")
----
We got a problem because module in second call of luactl load won't
loaded into lua context. And we got messages:
hello, kernel world!
...and after that error, that print is undefined (or something similar ;)).
Thank you in advance.
Regards, Alex.
On Sat, May 20, 2017 at 11:35 AM, Marc Balmer <mbalmer%netbsd.org@localhost> wrote:
> The following reply was made to PR kern/52226; it has been noted by GNATS.
>
> From: "Marc Balmer" <mbalmer%netbsd.org@localhost>
> To: gnats-bugs%gnats.NetBSD.org@localhost
> Cc:
> Subject: PR/52226 CVS commit: src/sys/modules/lua
> Date: Sat, 20 May 2017 08:31:13 +0000
>
> Module Name: src
> Committed By: mbalmer
> Date: Sat May 20 08:31:13 UTC 2017
>
> Modified Files:
> src/sys/modules/lua: lua.c
>
> Log Message:
> Only load a module if it is not already loaded in a state (much like userland
> Lua handles require).
> Fixes PR kern/52226.
>
>
> To generate a diff of this commit:
> cvs rdiff -u -r1.21 -r1.22 src/sys/modules/lua/lua.c
>
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.
>
Home |
Main Index |
Thread Index |
Old Index