Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Jul 2006 07:11:18 GMT
From:      Kip Macy <kmacy@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 101337 for review
Message-ID:  <200607120711.k6C7BIkP081687@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=101337

Change 101337 by kmacy@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);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607120711.k6C7BIkP081687>