1
0
This repository has been archived on 2024-11-10. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Lakka-rk322x/projects/L4T/packages/glibc/patches/submitted-nptl-invalid-td.patch
GavinDarkglider df536d5e8a [WIP] Lakka Switch V4.2-V4.3 fixups (#1692)
* Add patch to glibc that should have been there a long time ago.

* Initial wireguard support

* Bluetooth stack fixes, removes need to disable ertm for xbox controllers.

* Switch to xpadneo over xpad
2022-06-04 15:23:44 +03:00

19 lines
740 B
Diff

2010-02-27 Aurelien Jarno <aurelien@aurel32.net>
* pthreadP.h(INVALID_TD_P, INVALID_NOT_TERMINATED_TD_P): detect
NULL pointers.
--- a/nptl/pthreadP.h
+++ b/nptl/pthreadP.h
@@ -207,8 +207,8 @@ extern int __pthread_debug attribute_hidden;
/* Simplified test. This will not catch all invalid descriptors but
is better than nothing. And if the test triggers the thread
descriptor is guaranteed to be invalid. */
-# define INVALID_TD_P(pd) __builtin_expect ((pd)->tid <= 0, 0)
-# define INVALID_NOT_TERMINATED_TD_P(pd) __builtin_expect ((pd)->tid < 0, 0)
+# define INVALID_TD_P(pd) __builtin_expect (!pd || ((pd)->tid <= 0), 0)
+# define INVALID_NOT_TERMINATED_TD_P(pd) __builtin_expect (!pd || ((pd)->tid < 0), 0)
#endif