Summary
scrutiny-tests-2.scm contains a bad test but it passes anyway!
Metadata
- Id: f6661ff96e90d84f6a4b934bf12dd772ea44bac6
- Trac id: 1063
- Type: defect
- Reporter: sjamaan
- Owner:
- Cc:
- Status: closed
- Component: scrutinizer
- Estimated difficulty:
- Resolution: fixed
- Priority: critical
- Milestone: 4.9.0
- Version: 4.8.x
- Changetime: 2014-01-05 18:58:44 UTC
- Created: 2013-11-15 20:59:48 UTC
- Keywords:
Description
This should fail because {{{p}}} is not a proper list. It looks like the scrutinizer optimizes away the actual check(?)
Possibly a duplicate of #1039
Changes and comments
[2013-12-26 19:20:33 UTC] evhan wrote:
The reason the assertion fails but the test succeeds anyway is that scrutiny-tests-2.scm is compiled with `-analyze-only` and never run, just to generate the scrutiny output. If it were run there'd be an unrelated error (let vs. let*, I'll submit something for that shortly).
Regarding the scrutiny, the (list? p) check doesn't generate a warning since the expansion of assert includes a call to ##sys#error, which (because it isn't pure/clean/etc.) causes the pair p -- which starts the program with type (pair fixnum fixnum) -- to be smashed into simply pair. After that, nothing can be said in the argument type comparison of (not list) and pair.
I wonder if the complex type smashing can be safely avoided for noreturn procedures?
[2014-01-05 18:58:44 UTC] sjamaan changed status from new to closed
[2014-01-05 18:58:44 UTC] sjamaan set resolution to fixed
[2014-01-05 18:58:44 UTC] sjamaan wrote:
Fixed with 62157e9