Re: posix_spawn

"Kirill A. Korinsky" <[email protected]>
Newsgroups gmane.lisp.gcl.devel
Message-ID <[email protected]>
I did a bit more wired things. I add to each line inside siLheap_report a printf like this:

static void
FFN(siLheap_report)(void) {

  int i;

  check_arg(0);
  printf("1\n");fflush(stdout);

  vs_check_push(make_fixnum(sizeof(fixnum)*CHAR_SIZE));
  printf("2\n");fflush(stdout);
  vs_push(make_fixnum(PAGESIZE));
  printf("3\n");fflush(stdout);
  vs_push(make_fixnum((ufixnum)data_start));
  printf("4\n");fflush(stdout);
  vs_push(make_fixnum((ufixnum)data_start+(real_maxpage<<PAGEWIDTH)));
  printf("5\n");fflush(stdout);
  vs_push(make_fixnum(0));/*SHARED_LIB_HEAP_CEILING*/
  printf("6\n");fflush(stdout);
  i=sizeof(fixnum)*CHAR_SIZE-2;
  printf("7\n");fflush(stdout);
  i=1<<i;
  printf("8\n");fflush(stdout);
  vs_push(make_fixnum(((unsigned long)cs_base+i-1)&-i));
  printf("9\n");fflush(stdout);
  vs_push(make_fixnum(labs(cs_base-cs_org)));
  printf("10\n");fflush(stdout);
  vs_push(make_fixnum((CSTACK_DIRECTION+1)>>1));
  printf("11\n");fflush(stdout);
  vs_push(make_fixnum(CSTACK_ALIGNMENT));
  printf("12\n");fflush(stdout);
  vs_push(make_fixnum(labs(cs_limit-cs_org)));/*CSSIZE*/
  printf("13\n");fflush(stdout);
  vs_push(make_fixnum(phys_pages));
...

and it fails at the end like this.

SYSTEM>(init-system)
loading /opt/local/var/macports/build/_opt_local_var_macports_sources_github.com_catap_macports-ports_lang_gcl/gcl-devel/work/01ed2e0b2f540031171d2258ddccb951735827e7/gcl/unixport/../lsp/gcl_s.lsp
loading /opt/local/var/macports/build/_opt_local_var_macports_sources_github.com_catap_macports-ports_lang_gcl/gcl-devel/work/01ed2e0b2f540031171d2258ddccb951735827e7/gcl/unixport/../lsp/gcl_sf.lsp
loading /opt/local/var/macports/build/_opt_local_var_macports_sources_github.com_catap_macports-ports_lang_gcl/gcl-devel/work/01ed2e0b2f540031171d2258ddccb951735827e7/gcl/unixport/../lsp/gcl_rm.lsp
loading /opt/local/var/macports/build/_opt_local_var_macports_sources_github.com_catap_macports-ports_lang_gcl/gcl-devel/work/01ed2e0b2f540031171d2258ddccb951735827e7/gcl/unixport/../lsp/gcl_dl.lsp
loading /opt/local/var/macports/build/_opt_local_var_macports_sources_github.com_catap_macports-ports_lang_gcl/gcl-devel/work/01ed2e0b2f540031171d2258ddccb951735827e7/gcl/unixport/../lsp/gcl_fle.lsp
loading /opt/local/var/macports/build/_opt_local_var_macports_sources_github.com_catap_macports-ports_lang_gcl/gcl-devel/work/01ed2e0b2f540031171d2258ddccb951735827e7/gcl/unixport/../lsp/gcl_defmacro.lsp
loading /opt/local/var/macports/build/_opt_local_var_macports_sources_github.com_catap_macports-ports_lang_gcl/gcl-devel/work/01ed2e0b2f540031171d2258ddccb951735827e7/gcl/unixport/../lsp/gcl_hash.lsp
loading /opt/local/var/macports/build/_opt_local_var_macports_sources_github.com_catap_macports-ports_lang_gcl/gcl-devel/work/01ed2e0b2f540031171d2258ddccb951735827e7/gcl/unixport/../lsp/gcl_evalmacros.lsp
loading /opt/local/var/macports/build/_opt_local_var_macports_sources_github.com_catap_macports-ports_lang_gcl/gcl-devel/work/01ed2e0b2f540031171d2258ddccb951735827e7/gcl/unixport/../lsp/gcl_module.lsp
loading /opt/local/var/macports/build/_opt_local_var_macports_sources_github.com_catap_macports-ports_lang_gcl/gcl-devel/work/01ed2e0b2f540031171d2258ddccb951735827e7/gcl/unixport/../lsp/gcl_predlib.lsp
1
2
3
4
5
6
7
8
zsh: illegal hardware instruction  ./raw_pre_gcl
catap@Kirills-mini-m1 unixport %

So, it seems clear which line triggers an issue O:-)

Thus, I've changed the problem line to

  printf("8\n");fflush(stdout);
  make_fixnum(((unsigned long)cs_base+i-1)&-i);
  printf("9\n");fflush(stdout);

and it crashes the same way.

--
wbr, Kirill

> On 23. Dec 2023, at 18:07, Camm Maguire <[email protected]> wrote:
> 
> Greetings, and thanks so much!  Could you please put a
> printf("spawn");fflush(stdout); right before the patch and repeat?  This
> code should not be relevant at this point.
> 
> Take care,
> 
> "Kirill A. Korinsky" <[email protected]> writes:
> 
>> Here it is:
>> 
>> SYSTEM>(init-system)
>> loading /opt/local/var/macports/build/_opt_local_var_macports_sources_github.com_catap_macports-ports_lang_gcl/gcl-devel/work/01ed2e0b2f540031171d2258ddccb951735827e7/gcl/unixport/../lsp/gcl_s.lsp
>> loading /opt/local/var/macports/build/_opt_local_var_macports_sources_github.com_catap_macports-ports_lang_gcl/gcl-devel/work/01ed2e0b2f540031171d2258ddccb951735827e7/gcl/unixport/../lsp/gcl_sf.lsp
>> loading /opt/local/var/macports/build/_opt_local_var_macports_sources_github.com_catap_macports-ports_lang_gcl/gcl-devel/work/01ed2e0b2f540031171d2258ddccb951735827e7/gcl/unixport/../lsp/gcl_rm.lsp
>> loading /opt/local/var/macports/build/_opt_local_var_macports_sources_github.com_catap_macports-ports_lang_gcl/gcl-devel/work/01ed2e0b2f540031171d2258ddccb951735827e7/gcl/unixport/../lsp/gcl_dl.lsp
>> loading /opt/local/var/macports/build/_opt_local_var_macports_sources_github.com_catap_macports-ports_lang_gcl/gcl-devel/work/01ed2e0b2f540031171d2258ddccb951735827e7/gcl/unixport/../lsp/gcl_fle.lsp
>> loading /opt/local/var/macports/build/_opt_local_var_macports_sources_github.com_catap_macports-ports_lang_gcl/gcl-devel/work/01ed2e0b2f540031171d2258ddccb951735827e7/gcl/unixport/../lsp/gcl_defmacro.lsp
>> loading /opt/local/var/macports/build/_opt_local_var_macports_sources_github.com_catap_macports-ports_lang_gcl/gcl-devel/work/01ed2e0b2f540031171d2258ddccb951735827e7/gcl/unixport/../lsp/gcl_hash.lsp
>> loading /opt/local/var/macports/build/_opt_local_var_macports_sources_github.com_catap_macports-ports_lang_gcl/gcl-devel/work/01ed2e0b2f540031171d2258ddccb951735827e7/gcl/unixport/../lsp/gcl_evalmacros.lsp
>> loading /opt/local/var/macports/build/_opt_local_var_macports_sources_github.com_catap_macports-ports_lang_gcl/gcl-devel/work/01ed2e0b2f540031171d2258ddccb951735827e7/gcl/unixport/../lsp/gcl_module.lsp
>> loading /opt/local/var/macports/build/_opt_local_var_macports_sources_github.com_catap_macports-ports_lang_gcl/gcl-devel/work/01ed2e0b2f540031171d2258ddccb951735827e7/gcl/unixport/../lsp/gcl_predlib.lsp
>> zsh: illegal hardware instruction  ./raw_pre_gcl ./
>> catap@Kirills-mini-m1 unixport %
>> 
>> thus, meanwhile I made some investigation and localized the crash exact line in siLheap_report function:
>> vs_push(make_fixnum(((unsigned long)cs_base+i-1)&-i));
>> 
>> I've tried to remove vs_push and it doesn't change anything.
> 
> --
> Camm Maguire			     		    [email protected]
> ==========================================================================
> "The earth is but one country, and mankind its citizens."  --  Baha'u'llah
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEE3/KLNtcfWfLw7JxqmNjZhndZIm4FAmWHFi8ACgkQmNjZhndZ
Im6GChAAihzBuI/pzgmagmFyrUELCLAuaprNmGIFa+kGAdldQu5rPyIK4N7qASpM
QY0uNGnNsoTxzGmwDiIDd+dVreAugdFFvOSy8DOJytnkNRb67RN+9AgVAIbQBVIP
qJA6QRaW4KUCHC9YI4PpIqFZDMvhn+3mOfQH3Y6oz3uYYX5+mm3z5OC82ZphCHq/
WjV3RRS4QWAbyS2OhY1d5L7vXrUqA3tOJfAg2bhR1uYVoruY8Y7+5iwf+CFqAQiE
ARXfLFnFqi+vgMcBzb0OI4lJnAjrfcmLTQHHn1SoGqHj4+7SYwFm8VFvW6IQNuRt
5SJtIEbSIEQCOfZjQp2z5Cva4l3m9RrVadt/Ot0H5W54VcGxfsTF7+kEWdqWqazw
bbi18/4FVq/+5I0e9uSvhe0Ub8RPNwRak5WnpOMRezxCJWWFmLzdX8jQTtFpY/EK
A4Vw2TBs606GO+QsvzFZsW/BcJTSXMdgvzwhYSA316NviNHjM8wQQp3G/jAPsRJa
+FybE8MwBAxvkFB1SIvboZNwB/YOvsKxhNGEJ6SjjEkOvYSmOcmNnXsH5W0RrT8p
UHWTmF/ZSIcBFCP9xosz7ZXZiEESeecWQBHXo8Hw82jLHA6esYaSmjEawlhuGU70
Cd4lMjSZUTVl4PZSsPKRwLBu7LAUWE3lNvnJHscW3wV8UdmWJQQ=
=ujp3
-----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.