[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Unpicking require
- From: Gavin Wraith <gavin@...>
- Date: Thu, 25 Nov 2021 15:18:43 +0000
On 2021-11-25 14:22, Roberto Ierusalimschy wrote:
Thanks. I had just got this issue sorted. But I have another. Dynamic
loading of C modules causes a segmentation fault after the loaded code
local path, cpath in package
print (path, cpath)
local x = require "riscos"
Fatal signal received: Segmentation fault
I am assuming the 'RiscLua 544VFP-A' was written by the module's
open function, is that right? What else does it do?
No, it is
that produces that string. That is the strange thing. Quite complex
programs that put windows on the desktop run correctly. The bad things
happen when the programs close down.
There were many changes in the code around 'require' from 5.3 to 5.4,
but almost all of them were related to string manipulation done
before the open function is called (e.g., building file names and
Could any of those changes have left something for free_unlocked() to
stumble over? The last four functions on the stack are free_unlocked(),
__free(), do_dlclose() and __dlclose(). They are not part of Lua, are