Hello, > On 24. Dec 2023, at 15:31, Camm Maguire <c...@maguirefamily.org> wrote: > > "Kirill A. Korinsky" <kir...@korins.ky> 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
Description: Message signed with OpenPGP