aboutsummaryrefslogtreecommitdiff
path: root/devel/libexecinfo
diff options
context:
space:
mode:
authorMaxim Sobolev <sobomax@FreeBSD.org>2003-08-10 16:47:03 +0000
committerMaxim Sobolev <sobomax@FreeBSD.org>2003-08-10 16:47:03 +0000
commite9050dccb62311d2c76d657d1bf9129c2b9b2000 (patch)
tree3a628b2f7b2161ee49c4895b05a7598539f6bb61 /devel/libexecinfo
parent28f4cd7c675af45575be507f9a548830b74c392b (diff)
downloadports-e9050dccb62311d2c76d657d1bf9129c2b9b2000.tar.gz
ports-e9050dccb62311d2c76d657d1bf9129c2b9b2000.zip
Don't rely only on stack frame being 0 when bottom of stack reached, but
check return address as well. It is necessary for avoiding crash when FreeBSD threads are used.
Notes
Notes: svn path=/head/; revision=86726
Diffstat (limited to 'devel/libexecinfo')
-rw-r--r--devel/libexecinfo/Makefile2
-rw-r--r--devel/libexecinfo/files/patch-execinfo.c18
2 files changed, 19 insertions, 1 deletions
diff --git a/devel/libexecinfo/Makefile b/devel/libexecinfo/Makefile
index 92496dace646..d51ca0d6191c 100644
--- a/devel/libexecinfo/Makefile
+++ b/devel/libexecinfo/Makefile
@@ -7,7 +7,7 @@
PORTNAME= libexecinfo
PORTVERSION= 1.0
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= devel
MASTER_SITES= https://demo.portaone.com/~sobomax/freestuff/
diff --git a/devel/libexecinfo/files/patch-execinfo.c b/devel/libexecinfo/files/patch-execinfo.c
new file mode 100644
index 000000000000..5692e9b9dd7f
--- /dev/null
+++ b/devel/libexecinfo/files/patch-execinfo.c
@@ -0,0 +1,18 @@
+
+$FreeBSD$
+
+--- execinfo.c 2003/08/10 06:14:30 1.1
++++ execinfo.c 2003/08/10 06:15:23
+@@ -41,8 +41,11 @@
+ {
+ int i;
+
+- for (i = 1; getframeaddr(i + 1) != NULL && i != size + 1; i++)
++ for (i = 1; getframeaddr(i + 1) != NULL && i != size + 1; i++) {
+ buffer[i - 1] = getreturnaddr(i);
++ if (buffer[i - 1] == NULL)
++ break;
++ }
+
+ return i - 1;
+ }