Marcin you were right, it was ast malloc causing problems, I asked the leader of ksh if there was any way to disable it and he told me to pass -D_std_malloc. OpenBSD works perfectly now. Patch attached. I think we could safely merge this branch now if there are no further objections...
Thank you for your time, -Chase ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ On Sunday, January 17, 2021 2:48 PM, Marcin Cieslak <sa...@saper.info> wrote: > On Sun, 17 Jan 2021, Chase via cdesktopenv-devel wrote: > > > Not Working: > > OpenBSD 6.7, segfaults whenever free() is called, but this does work with > > the old version, so it is a regression, but OpenBSD couldn't even boot when > > I compiled normal master, it hung at dthello > > Is this free() used in ksh, or libc free()? ksh93 brings in a library called > libast which includes its own malloc > implementation. You might need to compile ksh93 and libast with debug symbols > to see what's going on there. > > One problem with libast's own malloc is that it uses ancient UNIX system call > sbrk(2) which > is slowly phased out by FreeBSD - that's the reason why we can't have ksh93 > on the latest FreeBSD > systems on aarch64 architecture - the system call is simply not there. > > Marcin
From 91e4c5a954d3f5db0317413281ee718e3690d3dd Mon Sep 17 00:00:00 2001 From: Chase <nicetry...@protonmail.ch> Date: Sun, 17 Jan 2021 17:22:16 -0600 Subject: [PATCH] dtksh: use std malloc instead of ast malloc --- cde/programs/dtksh/Imakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cde/programs/dtksh/Imakefile b/cde/programs/dtksh/Imakefile index 18bad1f92..b2d6275ba 100644 --- a/cde/programs/dtksh/Imakefile +++ b/cde/programs/dtksh/Imakefile @@ -104,7 +104,7 @@ libshell.a: $(KSH93LIBSHELL) init.o $(AR) libshell.a init.o pmain.o: - cd ksh93; ./bin/package flat make CCFLAGS='$(SUIDEXECDEFINES) -g' + cd ksh93; ./bin/package flat make CCFLAGS='$(SUIDEXECDEFINES) -g -D_std_malloc' cp ./ksh93/src/cmd/ksh93/sh/init.c init.c patch --posix init.c -i init.patch ./setup.sh -- 2.17.1
_______________________________________________ cdesktopenv-devel mailing list cdesktopenv-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel