We use LLVM libunwind in query profiler of ClickHouse DBMS.
Basically server is interrupted by signal with high frequency and libunwind API is called in signal handler. During the development we noticed that at random time points server aborts with message:
libunwind: getRegister ../contrib/libunwind/src/Registers.hpp:379 - unsupported x86_64 register
Further investigation with gdb has shown that libunwind tries to get register #16 (numeration starts from zero) which is RIP on x86_64.
We have tried to localise the problem and provide a minimum example, but there were no pattern in these errors.
After reading some code around Registers.hpp it turned out that UNW_X86_64_RIP is not handled in switches of Registers_x86_64 which we believe is a problem. This diff adds handling of this option.
We have applied this change to our fork of libunwind and error has never repeated again.