Giter VIP home page Giter VIP logo

Comments (5)

tautschnig avatar tautschnig commented on July 17, 2024

I am sorry, I don't understand how to reproduce this. Where can I find that let _ = std::boxed::Box::new(0_usize); that needs to be removed in order to observe the problem?

from cbmc.

remi-delmas-3000 avatar remi-delmas-3000 commented on July 17, 2024

Contracts instrumentation attempts to load free from the CPROVER library no matter what the GOTO model contains

CF here:

void dfcc_libraryt::load(std::set<irep_idt> &to_instrument)

The contracts instrumentation assumes that if an entry for a library function like free is found in the symbol table then the body of the function is present too, and it doesn't attempt to force-load the function. So the only way contracts would not load the free function into the model is if the symbol table produced by Kani contains an entry for the free function but does not contain the body of the function.

from cbmc.

tautschnig avatar tautschnig commented on July 17, 2024

The output mentioning builtin-library-free suggests it is loaded, so Iā€™m quite confused what is actually going on here. Needs details to reproduce and debug.

from cbmc.

remi-delmas-3000 avatar remi-delmas-3000 commented on July 17, 2024

This is an extract of kani_lib.c

// Declare functions instead of importing more headers in order to avoid conflicting definitions.
// See https://github.com/model-checking/kani/issues/1774 for more details.
void  free(void *ptr);
void *memcpy(void *dst, const void *src, size_t n);
void *calloc(size_t nmemb, size_t size);

Could these declarations result in an entry being present for free in the symbol table but the value of the symbol being absent ? or the entry being present but the GOTO function being pruned if its not actually used before contracts instrumentation is applied ?

from cbmc.

tautschnig avatar tautschnig commented on July 17, 2024

file <builtin-library-free> really suggests that we are reading (using?) the definition from CBMC's library, though admittedly this is part of a warning, so it could be that we don't actually link in the implementation. So, still, we need a way to actually reproduce this.

from cbmc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.