[Bug 225584] Various compile process hang on Ryzen, but not on Intel

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Feb 7 21:22:02 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=225584

--- Comment #45 from Konstantin Belousov <kib at FreeBSD.org> ---
(In reply to mike from comment #44)
Use this instead.

diff --git a/lib/libc/stdio/_flock_stub.c b/lib/libc/stdio/_flock_stub.c
index 069ed64c4e9..0180f8f285f 100644
--- a/lib/libc/stdio/_flock_stub.c
+++ b/lib/libc/stdio/_flock_stub.c
@@ -45,6 +45,8 @@ __FBSDID("$FreeBSD$");
 #include <string.h>
 #include <pthread.h>
 #include "un-namespace.h"
+#include <signal.h>
+#include <unistd.h>

 #include "local.h"

@@ -138,4 +140,11 @@ _funlockfile(FILE *fp)
                        _pthread_mutex_unlock(&fp->_fl_mutex);
                }
        }
+       else {
+               char x[120];
+               snprintf(x, sizeof(x), "funlockfile %p %p %p\n", fp,
+                   curthread, fp->_fl_owner);
+               write(2, x, strlen(x));
+               raise(SIGBUS);
+       }
 }

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list