Accessors not recompiled

Bug #1182204 reported by Ph. Marek
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Triaged
Low
Unassigned

Bug Description

I've got a DEFTYPE, and use this in a class.
Changing the DEFTYPE later on and recompiling everything (either via swank compile-and-load, or via ASDF) isn't sufficient - the old accessor functions/methods are still used, so the type checking is wrong.

Attached is a small testcase; the DEFTYPEs have to be un-commented, though.

Tags: pcl
Revision history for this message
Ph. Marek (ph-marek) wrote :
Revision history for this message
Stas Boukarev (stassats) wrote :

I'm not really sure what the code you're showing should do, but SBCL doesn't do any type-checking for slots with safety 1.

Revision history for this message
Ph. Marek (ph-marek) wrote :

Sorry, forgot to mention that I'm normally running with

    (declaim (optimize (debug 3) (safety 3)))

Revision history for this message
Stas Boukarev (stassats) wrote :

With safety declarations, it's possible to reproduce the test.

Changed in sbcl:
importance: Undecided → Low
status: New → Triaged
tags: added: pcl
Changed in sbcl:
assignee: nobody → Stas Boukarev (stassats)
Revision history for this message
Stas Boukarev (stassats) wrote :

The situation is the following:
slot-layouts-compatible-p checks if the types are eq, and that obviously doesn't work when deftype is changed.
generate-slotd-typecheck caches a type-check function based on the type name, that's easy to fix, since it can cache (specifier-type type) instead.
But the first one is a bit trickier, it either needs to store the expansion of the type in the slot structure, or just treat any types, besides the primitve ones, as incompatible. I'm not sure which strategy is better to pursue.

Changed in sbcl:
assignee: Stas Boukarev (stassats) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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