Comment 4 for bug 1931531

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

The code for the error in clisp is:

/* Verify the oint_addr_shift value w.r.t. the autoconfigured CODE_ADDRESS_RANGE
   and MALLOC_ADDRESS_RANGE values. */
#if !defined(WIDE_SOFT)
  /* The CODE_ADDRESS_RANGE needs to be checked because we store code
     pointers in Lisp objects (cf. macro ThePseudofun).
     In case of TYPECODES, the typecode() of such pointers must be machine_type,
     otherwise gc_mark() gets confused and crashes. */
  #if (CODE_ADDRESS_RANGE >> addr_shift) & ~(oint_addr_mask >> oint_addr_shift)
    #error oint_addr_mask does not cover CODE_ADDRESS_RANGE !!
  #endif

Values are:
CODE_ADDRESS_RANGE 0x000002AA09000000UL
addr_shift 0
oint_addr_mask (((2UL<<((64)-1))-1) & ~(0x01FC00000000UL | (1UL<<63)))
oint_addr_shift 0

So we can ignore the shft and this comes down to
  CODE_ADDRESS_RANGE & ~(oint_addr_mask)
  0x000002AA09000000UL & ~((((2UL<<((64)-1))-1) & ~(0x01FC00000000UL | (1UL<<63))))
= 0x000002AA09000000UL & ~(FFFFFFFFFFFFFFFF & 7FFFFE03FFFFFFFF)
= 0x000002AA09000000UL & 800001FC00000000
= 000000A800000000

I need a good case to compare it, the abstraction layers in the includes are too complex for someone not knowing the code to just read-what-should-happen