You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The symtab update for newly loaded shared libraries requires
memory allocation, which is not signal-safe and can cause
crashes. Updating symtab in a VM hook is not a viable option
either, as there are no guarantees that the symbol will be
dumped before its address is streamed. This patch completely
disables the runtime updates of the symtab for host symbols.
That means all Lua-C modules, FFI modules, and shared libraries
must be loaded before starting the profiler.
There is no test along with the patch for two main reasons:
1. The signal should land on an instruction inside the allocator
such that the second allocator call would cause a crash because of
an inconsistent inner state. Although we have ptrace-based
machinery for testing, the control is not that fine-grained. The
only option we have left is to rely on empirical offsets, which
is not a robust solution. Moreover, it is possible to build LuaJIT
with `malloc` as an allocator, and the test should be adapted to
that too. Needless to say, malloc sources may differ from
platform to platform, making the test unreliable.
2. Regression is unlikely here since this patch removes the only
call that could allocate memory inside the signal handler.
Resolvestarantool/tarantool#8140
0 commit comments