Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/lib/libsa from the new comment:



details:   https://anonhg.NetBSD.org/src/rev/5145e180a74e
branches:  trunk
changeset: 461257:5145e180a74e
user:      mrg <mrg%NetBSD.org@localhost>
date:      Thu Nov 21 07:34:39 2019 +0000

description:
from the new comment:

 * XXX Hack alert.  GCC 8.3 mis-compiles this function and calls
 * strncmp() with the wrong second pointer, as seen in PR#54703.
 *
 * Until the real cause is located, work around it by using -O1
 * for this function.

this hack is restricted to i386.

diffstat:

 sys/lib/libsa/ustarfs.c |  12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diffs (26 lines):

diff -r 89623f362a87 -r 5145e180a74e sys/lib/libsa/ustarfs.c
--- a/sys/lib/libsa/ustarfs.c   Thu Nov 21 06:22:09 2019 +0000
+++ b/sys/lib/libsa/ustarfs.c   Thu Nov 21 07:34:39 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ustarfs.c,v 1.35 2014/03/20 03:13:18 christos Exp $    */
+/*     $NetBSD: ustarfs.c,v 1.36 2019/11/21 07:34:39 mrg Exp $ */
 
 /* [Notice revision 2.2]
  * Copyright (c) 1997, 1998 Avalon Computer Systems, Inc.
@@ -381,6 +381,16 @@
        return 0;
 }
 
+/*
+ * XXX Hack alert.  GCC 8.3 mis-compiles this function and calls
+ * strncmp() with the wrong second pointer, as seen in PR#54703.
+ *
+ * Until the real cause is located, work around it by using -O1
+ * for this function.
+ */
+#ifdef __i386__
+__attribute__((__optimize__("O1")))
+#endif
 __compactcall int
 ustarfs_open(const char *path, struct open_file *f)
 {



Home | Main Index | Thread Index | Old Index