aboutsummaryrefslogtreecommitdiffstats
path: root/devel/libexecinfo
diff options
context:
space:
mode:
authorsobomax <sobomax@FreeBSD.org>2003-08-11 00:47:03 +0800
committersobomax <sobomax@FreeBSD.org>2003-08-11 00:47:03 +0800
commit492f53373170fc27c146580d4515bbb600eb7de6 (patch)
tree996a1891b7d443805adaf275088458702fc8b63e /devel/libexecinfo
parent4906f91da33e4632621a59d04df5d97d25e634fe (diff)
downloadfreebsd-ports-gnome-492f53373170fc27c146580d4515bbb600eb7de6.tar.gz
freebsd-ports-gnome-492f53373170fc27c146580d4515bbb600eb7de6.tar.zst
freebsd-ports-gnome-492f53373170fc27c146580d4515bbb600eb7de6.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.
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;
+ }