generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 129
Closed
Labels
T-UserTag user issues / requestsTag user issues / requests[C] BugThis is a bug. Something isn't working.This is a bug. Something isn't working.[F] CrashKani crashedKani crashed
Milestone
Description
When a kani is run with --mir-linker --enable-unstable
and encounters thread::current()
(or rather, the destructor of a thread object?) it yields the error message from the title.
I tried this code:
fn main() {}
#[kani::proof]
fn crash() {
std::thread::current();
}
using the following command line invocation:
cargo clean; cargo kani --mir-linker --enable-unstable
with Kani version: cargo-kani 0.12.0
I expected to see this happen: As std::thread
interfaces with the OS API (pthread on linux) I'd have expected kani to complain about it reaching some function for which it does not have access to the source code. If I run kani without --mir-linker
, this is indeed what happens.
Instead, this happened:
Checking harness crash...
CBMC 5.67.0 (cbmc-5.67.0)
CBMC version 5.67.0 (cbmc-5.67.0) 64-bit x86_64 linux
Reading GOTO program from file /home/ec2-user/kani-reproducer/target/x86_64-unknown-linux-gnu/debug/deps/cbmc-linked.for-crash.out
Generating GOTO Program
Adding CPROVER library (x86_64)
Removal of function pointers and virtual functions
Generic Property Instrumentation
Running with 16 object bits, 48 offset bits (user-specified)
Starting Bounded Model Checking
: function call: parameter "pthread_key_create::destructor" type mismatch:
got struct_tag
* identifier: tag-_3583338355805481440
expected pointer
* #source_location:
* file: <builtin-library-pthread_key_create>
* line: 11
* function: pthread_key_create
* working_directory: /home/ec2-user/kani-reproducer/src
* width: 64
* #failed_symbol: pthread_key_create::destructor$object
0: code
* #source_location:
* file: <builtin-library-pthread_key_create>
* line: 11
* function: pthread_key_create
* working_directory: /home/ec2-user/kani-reproducer/src
* return_type: empty
* #source_location:
* file: <builtin-library-pthread_key_create>
* line: 11
* function: pthread_key_create
* working_directory: /home/ec2-user/kani-reproducer/src
* parameters:
0: parameter
* type: pointer
* #source_location:
* file: <builtin-library-pthread_key_create>
* line: 11
* function: pthread_key_create
* working_directory: /home/ec2-user/kani-reproducer/src
* width: 64
0: empty
* #source_location:
* file: <builtin-library-pthread_key_create>
* line: 11
* function: pthread_key_create
* working_directory: /home/ec2-user/kani-reproducer/src
* #source_location:
* file: <builtin-library-pthread_key_create>
* line: 11
* function: pthread_key_create
* working_directory: /home/ec2-user/kani-reproducer/src
Verification Time: 0.81680673s
Metadata
Metadata
Assignees
Labels
T-UserTag user issues / requestsTag user issues / requests[C] BugThis is a bug. Something isn't working.This is a bug. Something isn't working.[F] CrashKani crashedKani crashed