gcl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: posix_spawn


From: Kirill A. Korinsky
Subject: Re: posix_spawn
Date: Sat, 23 Dec 2023 20:29:29 +0100

A file fix-memory-corruption-on-macOS.patch contains two patches. I just removed the second one (vsystem -> system) in favour of posix_spawn and applied it on 33a195d5cec2a7f8f563e11c0f1a3011ea0b30a0 which allows me to build GCL on macOS 12. It requires something like 3 hours I guess, but I did it from clean system.

Summary: posix_spawn works but it requires one more patch:

--- o/main.c
+++ o/main.c
@@ -432,7 +432,11 @@ gcl_cleanup(int gc) {
   if (gc) {
 
     saving_system=TRUE;
+
+/* on macOS it leads to ERROR "Caught fatal error [memory may be damaged]" */
+#ifndef __APPLE__
     GBC(t_other);
+#endif
     saving_system=FALSE;
     
     minimize_image();

If I recall right I made this patch as result of git bisect that points that this issue was introduced by cb842e61fd2d0ff5baf51918112003a3a1b69b45 when this line was introduced.

From my point of view posix_spawn is the right move and it really fixes things. If you think to commit it, please do!

-- 
wbr, Kirill

On 23. Dec 2023, at 01:20, Kirill A. Korinsky <kirill@korins.ky> wrote:

ha, it was false alarm.

I've waited for a while and it continue to working until it crashed as:

Warning: WILD-PATHNAME-P is being redefined.
Warning: SBIT is being redefined.
Warning: GETHASH is being redefined.
GCL (GNU Common Lisp)  2.7.0 Thu Oct 26 12:00:01 PM EDT 2023  CLtL1    git: Version_2_7_0pre9
Source License: LGPL(gcl,gmp), GPL(unexec,bfd,xgcl)
Binary License:  GPL due to GPL'ed components: (UNEXEC)
Modifications of this banner must retain notice of a compatible license
Dedicated to the memory of W. Schelter

Use (help) to get some basic information on how to use GCL.
Temporary directory for compiler files set to /var/folders/rq/wqy42lq543z9rwrlj7vf1h4r0000gn/T/

>;; Loading "boot.lisp"

Correctable error: The assertion (APPLY (QUOTE ARRAY-IN-BOUNDS-P) ARRAY ...) failed.
Signalled by APPLY.
If continued: Repeat assertion.The assertion (APPLY (QUOTE ARRAY-IN-BOUNDS-P) ARRAY ...) failed.

Broken at LET*.  Type :H for Help.
    1 (continue) Repeat assertion. 
    2  Return to top level. 
COMPILER>>make: *** [unixport/saved_gcl0] Error 255

-- 
wbr, Kirill

On 23. Dec 2023, at 00:59, Camm Maguire <camm@maguirefamily.org> wrote:

Too bad, because it is working for me and could be a generic solution.
Did it eliminate those C compiler warnings?  Can you run under gdb and
backtrace at the point asking for keyboard input?

cd unixport
make raw_pre_gcl
gdb raw_pre_gcl
(gdb) r ./ <foo

Take care,

"Kirill A. Korinsky" <kirill@korins.ky> writes:

something goes wrong here. It stuck like this:

loading /Users/catap/src/gcl/gcl/unixport/../cmpnew/gcl_cmpspecial.lsp
loading /Users/catap/src/gcl/gcl/unixport/../cmpnew/gcl_cmplam.lsp
loading /Users/catap/src/gcl/gcl/unixport/../cmpnew/gcl_cmplet.lsp
loading /Users/catap/src/gcl/gcl/unixport/../cmpnew/gcl_cmpvs.lsp
loading /Users/catap/src/gcl/gcl/unixport/../cmpnew/gcl_cmpwt.lsp
loading /Users/catap/src/gcl/gcl/unixport/../cmpnew/gcl_cmpmain.lsp

NIL

COMPILER>
(:SDEBUG
:SETF :PRE-GCL :DYNAMIC-EXTENT :INTDIV :64BIT :C99 :UNEXEC
:NATIVE-RELOC :EDITLINE :TRUNCATE_USE_C :CLX-LITTLE-ENDIAN :BSD
:DARWIN21.6.0 :X86_64 :IEEE-FLOATING-POINT :DARWIN :UNIX :GMP :GCL
:AKCL :COMMON :KCL)

COMPILER>
#<"SYSTEM" package>

SYSTEM>
T

SYSTEM>

and it expect my input via keyboard.

--
Camm Maguire         camm@maguirefamily.org
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah


Attachment: signature.asc
Description: Message signed with OpenPGP


reply via email to

[Prev in Thread] Current Thread [Next in Thread]