On 9/23/19, PR <polos.ru...@gmail.com> wrote:
> On 9/21/19, Marius Gerbershagen <marius.gerbersha...@gmail.com> wrote:
>> [...]

So, ECL starts up without problems now, but there is an (apparently)
known issue with GC. The app crashes, seemingly during the first cycle
of GC, see attached backtrace.

But I noticed these lines in the 'ecl-android' project (github) of
old, which has also an 'iOS' directory with an example app. There you
find these lines before 'cl_boot':

  int argc = 1;
  char *argv[256];
  argv[0] = "ecl";
  GC_allow_register_threads();
  GC_register_my_thread((const struct GC_stack_base *)argv);
  GC_stackbottom = (char*)(argv+255); // corrected to 'char*' (was: 'void*')
  setenv("ECLDIR", "", 1);
  cl_boot(argc, argv);

Now, if I put the above lines before 'cl_boot', the app works.

Does anybody know why this is needed, and what it is doing? Because if
my Lisp app grows (I tried to include :cl-ppcre), then the app crashes
again, despite the above hack (and with the same backtrace of the
attachment).

Of course I already tried bigger vector sizes (up to 8192) instead of
256, but that doesn't solve it.

What else could I try?

Thanks,

Paul

<<attachment: backtrace-ECL-iOS-GC-crash.zip>>

Reply via email to