Memory fault on printing a malformed condition

Bug #705690 reported by Stas Boukarev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
High
Unassigned

Bug Description

(error 'simple-error :format-control "" :format-arguments 8)
results in a memory fault, this boils down to

(sb-kernel::simple-condition-printer (make-condition 'simple-error :format-control "" :format-arguments 8) t)

It expects a list, but doesn't perform a type-check.

Changed in sbcl:
assignee: nobody → Nikodemus Siivola (nikodemus)
importance: Undecided → High
status: New → Triaged
Changed in sbcl:
status: Triaged → In Progress
Revision history for this message
Nikodemus Siivola (nikodemus) wrote :

This is really curious.

For some reason XC omits the type check for the argument to VALUES-LIST here.

Revision history for this message
Christophe Rhodes (csr21-cantab) wrote : Re: [Bug 705690] Re: Memory fault on printing a malformed condition

Nikodemus Siivola <email address hidden> writes:

> This is really curious.
>
> For some reason XC omits the type check for the argument to VALUES-LIST
> here.

It's because simple-control-format-arguments is a known function with a
LIST return type, no?

Christophe

Revision history for this message
Nikodemus Siivola (nikodemus) wrote :

Yes, but that type information is lost somehow during the build, so that that function is compiled trusting that, but SIMPLE-FORMAT-ARGUMENTS itself doesn't know it's supposed to check its return type.

(My guess is to blame DEFINE-CONDITION.)

Revision history for this message
Nikodemus Siivola (nikodemus) wrote :

1.0.47.23.

Changed in sbcl:
assignee: Nikodemus Siivola (nikodemus) → nobody
status: In Progress → Fix Committed
Stas Boukarev (stassats)
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.