On Fri, 31 Jul 2020 19:07:07 -0700
Josh Elsasser <j...@elsasser.org> wrote:

> I applied the diff directly from gitlab and was able to build ecl on
> sparc64 and mips64. When I tried to run the tests, sparc64 hung (not
> spinning) on test CMP.0009.FINALIZATION and mips64 segfaulted almost
> immediately:
> 
> Running test ATOMIC-INCF/DECF 
> ;;;
> ;;; Detected access to protected memory, also known as 'bus or segmentation 
> fault'.
> ;;; Jumping to the outermost toplevel prompt

I rechecked powerpc64 (and amd64, macppc) and can't reproduce the hang
or segfault.  In my opinion, we should package ecl-20.4.24 for mips64
and sparc64, even if we can't fix these problems.  I resent my gc diff
in "devel/boehm-gc: use mmap; fix powerpc64, sparc64" to ask for OK.

Who will commit the ecl update?  I want the update with these changes:
  1. remove the BROKEN-mips64
  2. add patch-src_c_package_d so I can run ecl on powerpc64

This is the patch-src_c_package_d; I have trimmed it to remove the
part that only reformatted a comment:

Index: patches/patch-src_c_package_d
===================================================================
RCS file: patches/patch-src_c_package_d
diff -N patches/patch-src_c_package_d
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_c_package_d       3 Aug 2020 16:11:28 -0000
@@ -0,0 +1,26 @@
+$OpenBSD$
+
+Work around a SIGSEGV on 64-bit big-endian platforms
+(mips64, powerpc64, sparc64), from Daniel Kochmaski,
+https://gitlab.com/embeddable-common-lisp/ecl/-/issues/604#note_388147381
+
+Index: src/c/package.d
+--- src/c/package.d.orig
++++ src/c/package.d
+@@ -327,10 +327,12 @@ ecl_find_package_nolock(cl_object name)
+     return name;
+   name = cl_string(name);
+ 
+-  p = ecl_symbol_value(@'*package*');
+-  if (ECL_PACKAGEP(p)) {
+-    p = ecl_assoc(name, p->pack.local_nicknames);
+-    if (!Null(p)) return ECL_CONS_CDR(p);
++  if (ecl_option_values[ECL_OPT_BOOTED]) {
++    p = ecl_symbol_value(@'*package*');
++    if (ECL_PACKAGEP(p)) {
++      p = ecl_assoc(name, p->pack.local_nicknames);
++      if (!Null(p)) return ECL_CONS_CDR(p);
++    }
+   }
+ 
+   l = cl_core.packages;

Reply via email to