On 2/9/21 3:26 PM, Theo Buehler wrote:
On Tue, Feb 09, 2021 at 03:19:00PM +0100, Renaud Allard wrote:
Hello,

It seems that I didn't test sniproxy deep enough after the patch removal for
STAILQ_*. There are core dumps with sniproxy without the patch.
I think this needs deeper investigation. Could you share a backtrace or
a reproducer for these crashes?

My bad, I tried to reproduce it and it seems there was a problem in my CFLAGS which caused the issue.

So here is the patch only for the -fno-common


Index: Makefile
===================================================================
RCS file: /cvs/ports/net/sniproxy/Makefile,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 Makefile
--- Makefile	8 Apr 2020 04:56:52 -0000	1.1.1.1
+++ Makefile	9 Feb 2021 14:39:29 -0000
@@ -6,6 +6,8 @@ GH_ACCOUNT =	dlundquist
 GH_PROJECT =	sniproxy
 GH_TAGNAME =	0.6.0
 
+REVISION =	0
+
 CATEGORIES =	net
 
 HOMEPAGE =	https://github.com/dlundquist/sniproxy
Index: patches/patch-src_http_c
===================================================================
RCS file: patches/patch-src_http_c
diff -N patches/patch-src_http_c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_http_c	9 Feb 2021 14:39:29 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: src/http.c
+--- src/http.c.orig
++++ src/http.c
+@@ -45,7 +45,7 @@ static const char http_503[] =
+     "Connection: close\r\n\r\n"
+     "Backend not available";
+ 
+-const struct Protocol *const http_protocol = &(struct Protocol){
++static const struct Protocol *const http_protocol = &(struct Protocol){
+     .name = "http",
+     .default_port = 80,
+     .parse_packet = &parse_http_header,
Index: patches/patch-src_http_h
===================================================================
RCS file: patches/patch-src_http_h
diff -N patches/patch-src_http_h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_http_h	9 Feb 2021 14:39:29 -0000
@@ -0,0 +1,13 @@
+$OpenBSD$
+
+Index: src/http.h
+--- src/http.h.orig
++++ src/http.h
+@@ -29,6 +29,6 @@
+ #include <stdio.h>
+ #include "protocol.h"
+ 
+-const struct Protocol *const http_protocol;
++static const struct Protocol *const http_protocol;
+ 
+ #endif
Index: patches/patch-src_tls_c
===================================================================
RCS file: patches/patch-src_tls_c
diff -N patches/patch-src_tls_c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_tls_c	9 Feb 2021 14:39:29 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: src/tls.c
+--- src/tls.c.orig
++++ src/tls.c
+@@ -60,7 +60,7 @@ static const char tls_alert[] = {
+     0x02, 0x28, /* Fatal, handshake failure */
+ };
+ 
+-const struct Protocol *const tls_protocol = &(struct Protocol){
++static const struct Protocol *const tls_protocol = &(struct Protocol){
+     .name = "tls",
+     .default_port = 443,
+     .parse_packet = (int (*const)(const char *, size_t, char **))&parse_tls_header,
Index: patches/patch-src_tls_h
===================================================================
RCS file: patches/patch-src_tls_h
diff -N patches/patch-src_tls_h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_tls_h	9 Feb 2021 14:39:29 -0000
@@ -0,0 +1,13 @@
+$OpenBSD$
+
+Index: src/tls.h
+--- src/tls.h.orig
++++ src/tls.h
+@@ -28,6 +28,6 @@
+ 
+ #include "protocol.h"
+ 
+-const struct Protocol *const tls_protocol;
++static const struct Protocol *const tls_protocol;
+ 
+ #endif

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to