Unreachable code
Description of problem
There is always a false condition in the function alloc_code_gen_buffer_splitwx_memfd in the file tcg/region.c. If buf_rw == NULL we go to the mark fail:
https://gitlab.com/qemu-project/qemu/-/blob/master/tcg/region.c?ref_type=heads#L580-L583
But the value of buf_rx is MAP_FAILED:
https://gitlab.com/qemu-project/qemu/-/blob/master/tcg/region.c?ref_type=heads#L577
And this line will never be reached:
https://gitlab.com/qemu-project/qemu/-/blob/master/tcg/region.c?ref_type=heads#L601
Found by Linux Verification Center (portal.linuxtesting.ru) with SVACE.
Author A. Voronin.
Edited by Ghost User