View | Details | Raw Unified | Return to bug 196711 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-2 / +2 lines)
Lines 1-8 Link Here
1
# $FreeBSD$
1
# $FreeBSD$
2
2
3
PORTNAME=	squid
3
PORTNAME=	squid
4
PORTVERSION=	3.4.10
4
PORTVERSION=	3.4.11
5
PORTREVISION=	2
6
CATEGORIES=	www ipv6
5
CATEGORIES=	www ipv6
7
MASTER_SITES=	http://www.squid-cache.org/Versions/v3/${PORTVERSION:R}/ \
6
MASTER_SITES=	http://www.squid-cache.org/Versions/v3/${PORTVERSION:R}/ \
8
		http://www2.us.squid-cache.org/Versions/v3/${PORTVERSION:R}/ \
7
		http://www2.us.squid-cache.org/Versions/v3/${PORTVERSION:R}/ \
Lines 98-103 Link Here
98
SSL_CRTD_CONFIGURE_ENABLE=	ssl-crtd
97
SSL_CRTD_CONFIGURE_ENABLE=	ssl-crtd
99
STACKTRACES_CONFIGURE_ENABLE=	stacktraces
98
STACKTRACES_CONFIGURE_ENABLE=	stacktraces
100
STACKTRACES_LIB_DEPENDS=	libunwind.so:${PORTSDIR}/devel/libunwind
99
STACKTRACES_LIB_DEPENDS=	libunwind.so:${PORTSDIR}/devel/libunwind
100
STACKTRACES_CONFIGURE_ON=	--disable-strict-error-checking
101
TP_IPFW_CONFIGURE_ENABLE=	ipfw-transparent
101
TP_IPFW_CONFIGURE_ENABLE=	ipfw-transparent
102
TP_IPF_CONFIGURE_ENABLE=	ipf-transparent
102
TP_IPF_CONFIGURE_ENABLE=	ipf-transparent
103
TP_PF_CONFIGURE_ENABLE=		pf-transparent
103
TP_PF_CONFIGURE_ENABLE=		pf-transparent
(-)distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (squid3.4/squid-3.4.10.tar.xz) = fb6dccf9ba426eddfc7b5dfe8786971f9779c571a53739a8a41024b09b12f888
1
SHA256 (squid3.4/squid-3.4.11.tar.xz) = b4ede14221d043bbde94655aee195b090fe33a9a0a3d4ed83a9b41fcd46cac1d
2
SIZE (squid3.4/squid-3.4.10.tar.xz) = 2161192
2
SIZE (squid3.4/squid-3.4.11.tar.xz) = 2162148
(-)files/extra-patch-gen-stacktrace (-62 lines)
Lines 60-124 Link Here
60
 #endif /* PRINT_STACK_TRACE */
60
 #endif /* PRINT_STACK_TRACE */
61
 
61
 
62
 #if SA_RESETHAND == 0 && !_SQUID_WINDOWS_
62
 #if SA_RESETHAND == 0 && !_SQUID_WINDOWS_
63
--- src/tools.cc.orig	2014-10-31 12:36:43.000000000 +0300
64
+++ src/tools.cc	2014-11-21 14:11:25.000000000 +0300
65
@@ -71,6 +71,13 @@
66
 #include <errno.h>
67
 #endif
68
 
69
+#if PRINT_STACK_TRACE
70
+#ifdef __FreeBSD__
71
+#define UNW_LOCAL_ONLY
72
+#include <libunwind.h>
73
+#endif
74
+#endif
75
+
76
 #define DEAD_MSG "\
77
 The Squid Cache (version %s) died.\n\
78
 \n\
79
@@ -411,6 +418,45 @@
80
     }
81
 
82
 #endif
83
+#ifdef __FreeBSD__
84
+    do {
85
+	unw_context_t unw_ctx;
86
+	unw_cursor_t unw_cp;
87
+	unw_word_t sp, ip, off;
88
+	int rc = 0;
89
+	char procname[256];
90
+	size_t frame;
91
+
92
+	bzero((void *)&unw_ctx, sizeof(unw_ctx));
93
+	bzero((void *)&unw_cp, sizeof(unw_cp));
94
+
95
+	if ((rc = unw_getcontext(&unw_ctx))) {
96
+            fprintf(debug_log, "Failed to trace own stack: "
97
+		    "unw_context() said '%s'.\n", unw_strerror(rc));
98
+	    break;
99
+	}
100
+	if ((rc = unw_init_local(&unw_cp, &unw_ctx))) {
101
+            fprintf(debug_log, "Failed to trace own stack: "
102
+		    "unw_init_local() said '%s'.\n", unw_strerror(rc));
103
+	    break;
104
+	}
105
+	frame = 0;
106
+	fprintf(debug_log, "Backtrace follows (deepest frame first):\n");
107
+	while ((rc = unw_step(&unw_cp)) > 0) {
108
+	    frame++;
109
+	    ip = 0; sp = 0;
110
+	    unw_get_reg(&unw_cp, UNW_REG_IP, &ip);
111
+	    unw_get_reg(&unw_cp, UNW_REG_SP, &sp);
112
+	    off = 0;
113
+	    rc = unw_get_proc_name(&unw_cp, procname, sizeof(procname), &off);
114
+	    if (rc)
115
+		snprintf (procname, sizeof(procname), "[unknown]");
116
+	    fprintf(debug_log, "#%zd: %s + 0x%zx, ip = 0x%zx, sp = 0x%zx\n",
117
+		    frame, procname, (size_t)off, (size_t)ip, (size_t)sp);
118
+	}
119
+	fprintf(debug_log, "Use addr2line of similar to translate offsets to line information.\n");
120
+    } while (0);
121
+#endif /* __FreeBSD__ */
122
 #endif /* PRINT_STACK_TRACE */
123
 
124
 #if SA_RESETHAND == 0 && !_SQUID_WINDOWS_
(-)files/patch-compat_compat.h (+20 lines)
Line 0 Link Here
1
--- compat/compat.h.orig	2015-01-13 11:53:17 UTC
2
+++ compat/compat.h
3
@@ -34,17 +34,6 @@
4
 #endif
5
 #endif
6
 
7
-/* Solaris 10 has a broken definition for minor_t in IPFilter compat.
8
- * We must pre-define before doing anything with OS headers so the OS
9
- * do not. Then un-define it before using the IPFilter *_compat.h headers.
10
- */
11
-#if IPF_TRANSPARENT && USE_SOLARIS_IPFILTER_MINOR_T_HACK
12
-/* But we only need do this nasty thing for src/ip/Intercept.cc */
13
-#if BUILDING_SQUID_IP_INTERCEPT_CC
14
-#define minor_t solaris_minor_t_fubar
15
-#endif
16
-#endif
17
-
18
 /*****************************************************/
19
 /* FDSETSIZE is messy and needs to be done before    */
20
 /* sys/types.h are defined.                          */
(-)pkg-plist (-4 / +4 lines)
Lines 2118-2124 Link Here
2118
sbin/purge
2118
sbin/purge
2119
sbin/squid
2119
sbin/squid
2120
sbin/squidclient
2120
sbin/squidclient
2121
@dir /var/log/squid
2121
@dir(squid,squid,750) /var/log/squid
2122
@dir /var/squid/cache
2122
@dir(squid,squid,750) /var/squid/cache
2123
@dir /var/squid/logs
2123
@dir(squid,squid,750) /var/squid/logs
2124
@dir /var/squid
2124
@dir(squid,squid,750) /var/squid

Return to bug 196711