A bug has been identified in the Linux kernel that breaks some programs that use AVX

In the Linux kernel since release 5.2, is manifested an error that causes the contents of the AVX register to be violated on return from a signal handler handled when an exception is thrown (page-fault). The problem occurs when running multi-threaded programs ("-pthread") that have calculations with the AVX register, if the kernel is built in GCC 9 (when compiled in earlier releases of GCC, the error does not appear, since GCC 9 caches the address of the thread-local variable in the register, and earlier versions of GCC load it every time).

The problem causes the program to terminate prematurely with a memory corruption error. The most noticeable and frequently observed manifestation of the error steel crashes Applicationswritten in the Go language. Due to the noted issue, Go programs terminate prematurely, typically with "runtime error: invalid memory address or nil pointer dereference", "runtime: unexpected return pc", and "segmentation violation" errors. In the kernel, the bug is still uncorrected. Possibility is being considered adding changes to the Go runtime to selectively work around the bug on problematic Linux kernels, at the cost of additional overhead.

Source: opennet.ru

Add a comment