lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Em dom., 28 de nov. de 2021 às 09:08, Ranier Vilela <> escreveu:
Em dom., 28 de nov. de 2021 às 07:35, Gavin Wraith <> escreveu:
On 2021-11-28 02:22, Sean Conner wrote:

>   I just noticed something---you have
>       local path, cpath in package
> That's not legal Lua syntax that I'm aware of.  Are you using a custom
> version of Lua?

Yes, RiscLua. I adopted Peter Shook's "Unpack Tables by Name" idea, back
in 2005, but restricted only to local variables. I find it very handy.

> Which version?

Well RiscLua has been going since 2002, and I usually make catch-up
versions to track standard Lua. But the version-numbering system has
gone a bit addled, and I am now adopting a new system that starts with
the Lua version followed by a reference to the FP hardware (VFP or FPA)
followed by a code to cope with anything else. So what I am testing, but
have not yet brought out, is 544VFP-A.

You have to realize that until a few years ago RISC OS was limited to
platforms having no FP hardware, and had no standard means of dynamic
loading. Recently, however, things have improved to the point that the
RISC OS aspect could be packed into a C-module, and RiscLua could cleave
more closely to standard Lua.

Roberto's suggestion to remove the call to dlclose() in loadlib.c seems
to have solved all my problems so far. Fingers crossed.
It seems that your RiscLua is running some code from the library
that dlclose is removed, after, this is the likely cause of the segmentation fault.
Maybe the order of load and unload packages can also be the cause.
You have to make sure that no library code is executed after dlclose.