FMAKUNBOUND a traced function makes UNTRACE signal an error

Bug #667657 reported by Jānis Džeriņš
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Low
Unassigned

Bug Description

Removing the global function definition from a traced symbol (function) makes
UNTRACE with no arguments (i.e., the intent being of untracing everything
that's being traced) to signal an UNDEFINED-FUNCTION error.

As it is now (SBCL 1.0.43.74), it is impossible to remove the funbound symbol
from the trace list.

If the same function is redefined and traced again, the same symbol is
inserted into the list of traced functions; calling UNTRACE with no arguments
now will warn about function being not traced. (What is a function that is
not being traced doing in the trace list, anyway?)

A sketch of the test case is attached.

Tags: review trace
Revision history for this message
Jānis Džeriņš (jonis) wrote :
Revision history for this message
Jānis Džeriņš (jonis) wrote :

Sorry for the misformatting, and I misunderstood the meaning of "this file is a patch", so, the attached file is a test case, not a patch.

Revision history for this message
Attila Lendvai (attila-lendvai) wrote :

i have an advertised fix for that since ages available at the link below and now attached here also.

http://dwim.hu/gitweb/gitweb.cgi?p=sbcl;a=commitdiff;h=3d097a76dd2cfbbd3f4ebfed5a45f9cd07e6d3e7

tags: added: review
tags: added: trace
Changed in sbcl:
status: New → Fix Committed
Revision history for this message
Jānis Džeriņš (jonis) wrote :

With the current fix calling UNTRACE with no arguments does not signal an error, but I would still expect the trace list be empty after the call. The spec says: "... If untrace is used with no function-names, all functions currently being traced are untraced." (http://www.lispworks.com/documentation/HyperSpec/Body/m_tracec.htm)

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

Yep.

CL-USER> (defun foo () t)
FOO
CL-USER> (trace foo)
(FOO)
CL-USER> (fmakunbound 'foo)
FOO
CL-USER> (untrace)
T
CL-USER> (trace)
(FOO)

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

In 1.0.44.5.

Changed in sbcl:
assignee: Nikodemus Siivola (nikodemus) → nobody
status: In Progress → 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

Bug attachments

Remote bug watches

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