Valgrind's implementation of the "execute relative long" (EXRL) instruction zero-extends the offset instead of sign-extending it. This has been seen to cause a crash with SIGSEGV in s390_irgen_EXRL() when a negative offset occurred.
Created attachment 142769 [details] Sign-extend "relative long" offset in EXRL This fixes the calculation of the "relative long" address in EXRL. The calculation is moved to a helper function addr_rel_long(), which is then used other places as well, wherever applicable. For consistency, the helper function addr_relative() is added as well.
Created attachment 142911 [details] Fix with added test case This version of the patch also adds an EXRL invocation with a negative offset to the "exrl.c" test case. Without the fix, Valgrind crashes when trying to execute this.
Applied as commit b77dbefe72e4a5c7bcf1576a02c909010bd56991.