Just tried neochat on a kern.wxabort=1 machine which causes

$ neochat
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-kn'
Abort trap (core dumped) 

Mar 10 22:06:11 eru /bsd: neochat(28258): mmap W^X violation


Relaxing the sysctl changes things into

# sysctl kern.wxabort=0
kern.wxabort: 1 -> 0
$ neochat
[starting normally]

Mar 10 22:06:55 eru neochat: vfprintf %s NULL in "%s SIMD%d shader: %d inst, %d 
loops, %u cycles, %d:%d spills:fills, %u sends, scheduled with mode %s, 
Promoted %u constants, compacted %d to %d bytes. "


I know we have a knob for this but I have no idea whether a) neochat
is expected to require W^X and b) this is the way to handle this in
ports.

Running with the diff short-cuts uvm_wxcheck()'s abort as expected and
lets me start neochat with kern.wxabort set.

Feedback? Objection? OK?

Index: Makefile
===================================================================
RCS file: /cvs/ports/net/neochat/Makefile,v
retrieving revision 1.5
diff -u -p -r1.5 Makefile
--- Makefile    8 Dec 2021 02:52:42 -0000       1.5
+++ Makefile    10 Mar 2022 20:51:19 -0000
@@ -1,8 +1,11 @@
 # $OpenBSD: Makefile,v 1.5 2021/12/08 02:52:42 abieber Exp $
 
+USE_WXNEEDED = Yes
+
 COMMENT =      client for Matrix chat
 VERSION =      1.2.0
 DISTNAME =     neochat-${VERSION}
+REVISION =     0
 
 CATEGORIES=    net
 

Reply via email to