From 5baad9a6f948b7822db3392097e7d79e9e018655 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sat, 18 Jul 2020 15:12:56 +0200 Subject: [PATCH] hurd: Fix longjmp check for sigstate * sysdeps/mach/hurd/i386/____longjmp_chk.S,__longjmp.S: Properly check for sigstate being NULL. --- sysdeps/mach/hurd/i386/____longjmp_chk.S | 2 +- sysdeps/mach/hurd/i386/__longjmp.S | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/mach/hurd/i386/____longjmp_chk.S b/sysdeps/mach/hurd/i386/____longjmp_chk.S index 5131386c60..a746a4f2ba 100644 --- a/sysdeps/mach/hurd/i386/____longjmp_chk.S +++ b/sysdeps/mach/hurd/i386/____longjmp_chk.S @@ -67,7 +67,7 @@ ENTRY (____longjmp_chk) movl %gs:SIGSTATE_OFFSET, %edi testl %edi, %edi - jnz .Lok /* sigstate not initialized yet */ + jz .Lok /* sigstate not initialized yet */ testl $SS_ONSTACK, (HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_FLAGS__OFFSET)(%edi) jnz .Lonstack diff --git a/sysdeps/mach/hurd/i386/__longjmp.S b/sysdeps/mach/hurd/i386/__longjmp.S index 73bbff9826..af788ede0f 100644 --- a/sysdeps/mach/hurd/i386/__longjmp.S +++ b/sysdeps/mach/hurd/i386/__longjmp.S @@ -45,7 +45,7 @@ ENTRY (__longjmp) movl %gs:SIGSTATE_OFFSET, %edi testl %edi, %edi - jnz .Lok /* sigstate not initialized yet */ + jz .Lok /* sigstate not initialized yet */ testl $SS_ONSTACK, (HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_FLAGS__OFFSET)(%edi) jz .Lok