Date: Thu, 23 Jul 2020 19:23:40 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 248225] Linuxulator: pthread_join crash Message-ID: <bug-248225-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D248225 Bug ID: 248225 Summary: Linuxulator: pthread_join crash Product: Base System Version: 12.1-RELEASE Hardware: amd64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: iwtcex@gmail.com % cat pthread-crash.c #define _GNU_SOURCE #include <pthread.h> #include <stdio.h> static void* test(void* arg) { printf("%s started\n", __func__); return NULL; } int main() { pthread_t t; pthread_create(&t, NULL, test, NULL); void* val; pthread_join(t, &val); pthread_join(t, &val); return 0; } % /compat/linux/bin/gcc -Wall pthread-crash.c -pthread -o pthread-crash % ./pthread-crash test started Segmentation fault (core dumped) It should be noted, while calling pthread_join in that manner is explicitly discouraged in both FreeBSD and Linux man pages, some programs (Steam) still occasionally do this and this does not lead to crash on Linux. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-248225-227>