sb-simple-streams:open silently ignores unknown stream class

Bug #969352 reported by Kambiz Darabi on 2012-03-30
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Calling open with a non-existent or non-stream :class argument

(sb-simple-streams:open "/etc/hosts" :class 'class-which-does-not-exist)

returns NIL without any error.

I have attached a patch which changes the cond form in open to signal
an error in that case. Two test cases are included.

This is the thread on the sbcl-devel mailing list:

I'm using SBCL on Ubuntu Oneiric

Linux 3.0.0-12-generic #20-Ubuntu SMP Fri Oct 7 14:50:42 UTC 2011 i686 i686 i386 GNU/Linux



Stas Boukarev (stassats) on 2012-03-30
Changed in sbcl:
status: New → Confirmed
importance: Undecided → Low
status: Confirmed → Triaged
Changed in sbcl:
assignee: nobody → Nikodemus Siivola (nikodemus)
status: Triaged → In Progress
Nikodemus Siivola (nikodemus) wrote :

commit ac28b4bc430e89db490c9bb23ec7aa8d7cfe318a
Author: Kambiz Darabi <email address hidden>
Date: Fri Jan 6 09:11:36 2012 +0100

    sb-simple-streams: signal an error for bad stream classes in OPEN

      Instead of silently returning NIL, signal an error if the class does not
      exist (if argument :class is a symbol) or is not a stream class.


Changed in sbcl:
assignee: Nikodemus Siivola (nikodemus) → nobody
status: In Progress → Fix Committed
Stas Boukarev (stassats) on 2012-05-21
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers