Re: posix_spawn

"Kirill A. Korinsky" <[email protected]>
Newsgroups gmane.lisp.gcl.devel
Message-ID <[email protected]>
Hello,

> On 24. Dec 2023, at 15:31, Camm Maguire <[email protected]> wrote:
> 
> "Kirill A. Korinsky" <[email protected]> writes:
> 
>> --- 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.
>> 
> 
>  OK we need to get to the bottom of this too.  It seems the problem
>  area is:
> 
>  if (saving_system) {
> 
>    struct pageinfo *v;
>    void *x;
>    struct typemanager *tm=tm_of(t_stream);
>    unsigned j;
> 
>    for (v=cell_list_head;v;v=v->next)
>      if (tm->tm_type==v->type)
> 	for (x=pagetochar(page(v)),j=tm->tm_nppage;j--;x+=tm->tm_size) {
> 	  object o=x;
> 	  if (type_of(o)==t_stream && !is_free(o) && o->sm.sm_fp && o->sm.sm_fp!=stdin && o->sm.sm_fp!=stdout && o->sm.sm_fp!=stderr)
> 	    close_stream(o);
> 	}
> 
>    gc_time = -1;
>    }
> 
>  Problem should also go away if you remove the saving_system=TRUE
>  line.  I suspect mac is naming stdin,stdout,stderr in an unusual way
>  and gcl is trying to close one of these.


before I run almost 3 hours of build on my laptop :) let confirm your hypotesa about wired naming. How can I check it?

--
wbr, Kirill
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEE3/KLNtcfWfLw7JxqmNjZhndZIm4FAmWISFAACgkQmNjZhndZ
Im7P+Q/+Ou9jrzeVpriLhS3auqEwRh1I/9gUqsX9g56YKmLq2yF4a2utKEiwd9dw
2oE2SxclGIwTx+WGWRoF9RIG1/+2/5nM7J/ZouRIaE0IrY6PIx1IL6rDuPTtpo9h
r3QT6j1HPfkv2gPPg0ehotBcf/d83ClfLsfi1OX9bPvFaTOH0KklsI5WzbCZx0ko
ET817dxNI96eKccnSzgownaOQrFxbAkVwEyptWx3jBLXkazxrFGqoDnIkvVIAY54
4yqgRtFOY8TfGsYOi67aMUVrptXvGnDUrHRk+SElkqfrgD7rcIaWSIw4TxM6W75L
v9LKsr+Y0fJc/ff2OY7eF3u2Q+/8VVdhYGNtiRiS9Yz4thchj86GeS0rA/aqMcVe
EhwWAbaJKBFpPDKQ2SVZ+hDNi85dAWlJOUTGm5bmxu47gIrhYk0w6a9l9WNrUlxd
sZ8i+nP5Q6DG6mo0PCeBLFyg7LNr+XEgbDBtWqNWAd7z6BnpEL6erM8Z1X6yuoWM
fOnUXOqVlcZBo+o9+5nRWZ6EQR+W/0lC730vhpJcY9T1X1D0GJ4gcLgEgKtkST3B
kVHni3XHF6ALCC3aIApbNGLS7ZNcBJNLWk8F6Hax1XlL8HpWKfWziehG3ZXBMmeX
wt27qyRK08gOaIQSs4fI/v2KBGxl1oSWPxY4aExD20sKxWnPc0k=
=k4Pi
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.