GNU bug report logs - #43583
[PATCH 0/4] Fix DFLTCC segfault when compressing or decompressing two files

Previous Next

Package: gzip;

Reported by: Ilya Leoshkevich <iii <at> linux.ibm.com>

Date: Wed, 23 Sep 2020 22:10:02 UTC

Severity: normal

Tags: patch

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

Full log


Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ilya Leoshkevich <iii <at> linux.ibm.com>
To: Jim Meyering <meyering <at> fb.com>, Paul Eggert <eggert <at> cs.ucla.edu>
Cc: Ilya Leoshkevich <iii <at> linux.ibm.com>, bug-gzip <at> gnu.org
Subject: [PATCH 2/4] Fix building DFLTCC with clang
Date: Thu, 24 Sep 2020 00:08:55 +0200
clang does not support .machinemode, so put it under an #ifdef.
---
 dfltcc.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/dfltcc.c b/dfltcc.c
index 432c68c..86aa56e 100644
--- a/dfltcc.c
+++ b/dfltcc.c
@@ -160,10 +160,15 @@ is_dfltcc_enabled (void)
   /* STFLE is supported since z9-109 and only in z/Architecture mode.  When
    * compiling with -m31, gcc defaults to ESA mode, however, since the kernel
    * is 64-bit, it's always z/Architecture mode at runtime.  */
-  __asm__ (".machinemode push\n"
+  __asm__ (
+#ifndef __clang__
+           ".machinemode push\n"
            ".machinemode zarch\n"
+#endif
            "stfle %[facilities]\n"
+#ifndef __clang__
            ".machinemode pop\n"
+#endif
            : [facilities] "=Q"(facilities), [r0] "+r"(r0) :: "cc");
   return is_bit_set (facilities, DFLTCC_FACILITY);
 }
-- 
2.25.4





This bug report was last modified 3 years and 340 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.