Thursday, February 02, 2023

Re: lang/sbcl will not work with x-only

On Fri, 27 Jan 2023 16:02:28 -0700
Josh Elsasser <josh@elsasser.org> wrote:

> Unfortunately I don't have a new enough CPU to test xonly, so someone
> should probably mark it USE_NOEXECONLY

Might not need USE_NOEXECONLY. I have a macppc G5 with xonly and
built lang/sbcl for powerpc, it seems to work. My ld was not xonly
by default, but I added --execute-only to my build.

powerpc's traps are like amd64's. This one is in ppc-assem.S,

twllei reg_ZERO, trap_FunEndBreakpoint

This says to trap if unsigned word 0 <= trap_FunEndBreakpoint. This
condition is always true, but the sigtrap_handler in ppc-arch.c will
read the trap_FunEndBreakpoint from the instruction, so it needs the
same read access as ".byte trap_FunEndBreakpoint" on amd64.

The above "twllei" should crash by SIGSEGV, because it should be in
xonly .text, but I might not have reached this "twllei" today, because
I was not using sbcl's debugger. If we can find a way to reach this
"twllei", then maybe we do need USE_NOEXECONLY.

sbcl can also generate "twllei"s with the TRAP_INSTRUCTION macro in
ppc-arch.c, but these might be RWX (sbcl has USE_WXNEEDED), so xonly
might not affect them.

--George

Finished running tests.
Status:
Expected failure: array.pure.lisp / CHECK-BOUND-SIGNED-BOUND-NOTES
Expected failure: compiler-2.pure.lisp / (MAP-ALLOCATED-OBJECTS NO-CONSING)
Expected failure: compiler-2.pure.lisp / DEDUPLICATED-FDEFNS
Expected failure: compiler.pure.lisp / (ODDP BIGNUM NO-CONSING)
Expected failure: compiler.pure.lisp / (LOGTEST BIGNUM NO-CONSING)
Failure: compiler.pure.lisp / REDUCING-CONSTANTS
Failure: compiler.pure.lisp / REDUCING-CONSTANTS.2
Expected failure: dynamic-extent.pure.lisp / DX-COMPILER-NOTES
Expected failure: float.pure.lisp / (ADDITION-OVERFLOW BUG-372)
Expected failure: float.pure.lisp / (ADDITION-OVERFLOW BUG-372 TAKE-2)
Expected failure: hash.pure.lisp / SXHASH-ON-DISPLACED-STRING
Skipped (broken): interface.pure.lisp / RESTART-BOGUS-ARG-TO-VALUES-LIST-ERROR
Expected failure: random.pure.lisp / FLOAT-NO-CONSING
Expected failure: selfbuild-output.pure.lisp / MAKE-LIST-%MAKE-LIST-NOT-CALLED
Expected failure: block-compile.impure.lisp / BLOCK-DEFPACKAGE-RENAME-PACKAGE-REDEFPACKAGE
Expected failure: block-compile.impure.lisp / BLOCK-DEFPACKAGE-RENAME-PACKAGE
Expected failure: block-compile.impure.lisp / BLOCK-COMPILE-TOP-LEVEL-CLOSURES.SAME-ENVIRONMENT.LOCAL-CALLS
Expected failure: compiler.impure.lisp / FTYPE-RETURN-TYPE-CONFLICT
Expected failure: debug.impure.lisp / (TRACE ENCAPSULATE NIL)
Expected failure: debug.impure.lisp / (TRACE ENCAPSULATE NIL RECURSIVE)
Expected failure: debug.impure.lisp / (TRACE ANONYMOUS)
Expected failure: debug.impure.lisp / (TRACE METHODS ENCAPSULATE NIL)
Expected failure: debug.impure.lisp / (TRACE LABELS)
Expected failure: debug.impure.lisp / (TRACE LABELS WITHIN-METHOD)
Expected failure: debug.impure.lisp / (TRACE LABELS WITHIN-UNTRACED-METHOD)
Expected failure: debug.impure.lisp / (TRACE LABELS REDEFINED)
Expected failure: debug.impure.lisp / (TRACE LABELS REDEFINED-METHOD)
Expected failure: debug.impure.lisp / (TRACE COMPILER-MACRO)
Expected failure: debug.impure.lisp / (TRACE FLET WITHIN-COMPILER-MACRO)
Expected failure: debug.impure.lisp / (TRACE COMPILER-MACRO REDEFINED)
Expected failure: debug.impure.lisp / (TRACE WHEREIN ENCAPSULATE NIL)
Expected failure: debug.impure.lisp / (TRACE WHEREIN RECURSIVE ENCAPSULATE NIL)
Expected failure: debug.impure.lisp / (TRACE MACRO)
Expected failure: debug.impure.lisp / (TRACE LABELS WITHIN-MACRO)
Expected failure: debug.impure.lisp / (TRACE MACRO REDEFINED)
Expected failure: debug.impure.lisp / (TRACE CAS)
Expected failure: debug.impure.lisp / (TRACE CAS GENERIC)
Expected failure: debug.impure.lisp / (TRACE SETF)
Expected failure: full-eval.impure.lisp / INLINE-FUN-CAPTURES-DECL
Expected failure: hash-table.impure.lisp / HASH-TABLE-ITERATOR-NO-NOTES
Expected failure: packages.impure.lisp / USE-PACKAGE-CONFLICT-SET
Expected failure: packages.impure.lisp / IMPORT-SINGLE-CONFLICT
Skipped (broken): run-program.impure.lisp / (RUN-PROGRAM AUTOCLOSE-STREAMS)
Skipped (broken): timer.impure.lisp / (TIMER PARALLEL-UNSCHEDULE)
Expected failure: walk.impure.lisp / (WALK MULTIPLE-VALUE-BIND)
Expected failure: walk.impure.lisp / (WALK MULTIPLE-VALUE-BIND SPECIAL)
Invalid exit status: foreign.test.sh
(123 tests skipped for this combination of platform and features)
test failed, expected 104 return code, got 1
*** Error 1 in . (Makefile:96 'do-test')

No comments:

Post a Comment