Skip to content

count leading zeros failures disappear with --reachability-slice #6730

Closed
@zhassan-aws

Description

@zhassan-aws

(Could not reopen #6394 so filing a new issue).

On the attached test generated by Kani, the "count leading zeros" failures disappear if the goto binary is processed through goto-instrument --reachability-slice.

Steps to reproduce:

  1. tar xvzf bounds.out.tar.gz
  2. cbmc --bounds-check bounds.out :
** Results:
[assertion.1] Code generation sanity check: Correct CBMC vtable size for StructTag("tag-_13509187325931132202") (MIR type Closure(DefId(2:9481 ~ std[b2e3]::rt::lang_start::{closure#0}), [(), i8, extern "rust-call" fn(()) -> i32, (fn(),)])). Please report failures:
https://github.com/model-checking/kani/issues/new?template=bug_report.md: SUCCESS
[bit_count.1] count leading zeros is undefined for value zero in __builtin_clz(var_10): FAILURE
[bit_count.2] count leading zeros is undefined for value zero in __builtin_clz(var_12): FAILURE
[bit_count.3] count leading zeros is undefined for value zero in __builtin_clz(var_14): FAILURE
[bit_count.4] count leading zeros is undefined for value zero in __builtin_clz(var_16): FAILURE
[bit_count.5] count leading zeros is undefined for value zero in __builtin_clz(var_18): FAILURE
[bit_count.6] count leading zeros is undefined for value zero in __builtin_clz(var_20): FAILURE
[bit_count.7] count leading zeros is undefined for value zero in __builtin_clz(var_22): FAILURE
[bit_count.8] count leading zeros is undefined for value zero in __builtin_clz(var_24): FAILURE
  1. goto-instrument --reachability-slice bounds.out bounds_after.out
  2. cbmc --bounds-check bounds_after.out
** Results:
[assertion.1] Code generation sanity check: Correct CBMC vtable size for StructTag("tag-_13509187325931132202") (MIR type Closure(DefId(2:9481 ~ std[b2e3]::rt::lang_start::{closure#0}), [(), i8, extern "rust-call" fn(()) -> i32, (fn(),)])). Please report failures:
https://github.com/model-checking/kani/issues/new?template=bug_report.md: SUCCESS

** 0 of 1 failed (1 iterations)
VERIFICATION SUCCESSFUL

** 8 of 9 failed (2 iterations)
VERIFICATION FAILED

CBMC version: 5.52.0
Operating system: Ubuntu 20.04
Exact command line resulting in the issue: See above
What behaviour did you expect: Failures to remain with --reachability-slice
What happened instead: Failures disappear

Metadata

Metadata

Assignees

Labels

awsBugs or features of importance to AWS CBMC usersaws-highdocumentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions