(declaim (optimize debug)) corrupts coverage data

Bug #1947613 reported by Valeriy Fedotov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Undecided
Unassigned

Bug Description

Hi!

I usually develop my code with (declaim (optimize debug)) for simpler debugging, and I noticed that coverage data gathered with sb-cover module changes a lot when I use this declaim.

Vanilla coverage data without any additional declaims to (declaim (optimize sb-cover:store-coverage-data)) does not highlight defvar, defpackage and many other forms.

But when debug is turned on I can get defvar, defpackage and other forms withous function body to be green or red. I do not know what is the mechanism behind marking them red or green. In my code they are always red, but my project is too large for attaching it here. In minimized version all defvars and defpackages are always green.

I'm attaching .zip archive with minimized version. You can launch it with
sbcl --script main.lisp

Also for convenience I attach image with non-debug-optimized result on the left side, and optimized on the right.

Thank you.

Revision history for this message
Valeriy Fedotov (valeriy-fedotov) wrote :
Revision history for this message
Valeriy Fedotov (valeriy-fedotov) wrote :

Image attachment

Revision history for this message
Valeriy Fedotov (valeriy-fedotov) wrote :

Edited typo in the description. In minimized version all defvars and defpackages are actually green.

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

With debug>1 top level forms are compiled, as opposed to fop-compiled, which does not have coverage. Red or green is probably if you load it from a fasl or compile again.

Changed in sbcl:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers