#<sb-c:tn> is not valid as the third argument to VOP: SB-KERNEL:%RAW-INSTANCE-SET/WORD

Bug #2052329 reported by Patrick Poitras
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Undecided
Unassigned

Bug Description

We can trigger a bug using the following in a fresh session.

(funcall (lambda ()
           (DEFSTRUCT BLARG
             (A 0 :TYPE (unsigned-byte 64)))
           (MAKE-BLARG :A 123)))

#<SB-C:TN #:G320!1 :DEBUG-ENVIRONMENT> is not valid as the third argument to VOP:
  SB-KERNEL:%RAW-INSTANCE-SET/WORD
Primitive type: T
SC restrictions:
  (SB-VM::UNSIGNED-REG)
The primitive type disallows these loadable SCs:
  (SB-VM::UNSIGNED-REG)
   [Condition of type SIMPLE-ERROR]

Subsequent calls to this piece of code will not trigger the error.

SBCL Versions tested: 2.3.3 and 2.4.1.60-9863540f7

uname -a

Linux <username> 5.15.0-76-generic #83-Ubuntu SMP Thu Jun 15 19:16:32 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

-----------------

Additional notes:

This was noticed in the wild in the context of a testing suite that spawned test-related structures as part of the test.

Edit: `:type (unsigned-byte 64)` and `:type (signed-byte 64)` both throw this error, but the 8,16, and 32-bit equivalents do not.

description: updated
Stas Boukarev (stassats)
Changed in sbcl:
status: New → Fix Committed
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.