PERFORCE change 101337 for review

Kip Macy kmacy at FreeBSD.org
Wed Jul 12 07:11:19 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=101337

Change 101337 by kmacy at kmacy_vt-x:dtrace on 2006/07/12 07:11:15

	apply change 1.3 
	fixes segmentation fault in applications statically linked to libthr

Affected files ...

.. //depot/projects/dtrace/src/lib/libthr/sys/thr_error.c#3 edit

Differences ...

==== //depot/projects/dtrace/src/lib/libthr/sys/thr_error.c#3 (text+ko) ====

@@ -45,10 +45,12 @@
 int *
 __error(void)
 {
-	struct pthread *curthread = _get_curthread();
+	struct pthread *curthread;
 
-	if (curthread != NULL && curthread != _thr_initial)
-		return (&curthread->error);
-	else
+	if (_thr_initial != NULL) {
+		curthread = _get_curthread();
+		if (curthread != NULL && curthread != _thr_initial)
+			return (&curthread->error);
+	} else
 		return (&errno);
 }


More information about the p4-projects mailing list