Giter Site home page Giter Site logo

Comments (17)

mutilin avatar mutilin commented on May 30, 2024

All benchmarks in ldv-consumption directory are using parameters var_groupN which are not initialized. Why only these 3 benchmarks are causing problems?

from sv-benchmarks.

shaobo-he avatar shaobo-he commented on May 30, 2024

Hi @mutilin,

Based on my observation, it is because dereferencing some uninitialized function pointers that are reachable from these parameters results in calling functions that lead to assertion failure (let's call them buggy functions). In some benchmarks, buggy functions do not match the signature of these uninitialized function pointers while others do as those that I pointed out in my previous comment. I can show you the location where such function pointer deference happens.

from sv-benchmarks.

zvonimir avatar zvonimir commented on May 30, 2024

@mutilin It could as well be that other benchmarks contain similar problems. It is hard to say why SMACK is not discovering these problems in other benchmarks. Maybe they are in the parts of the code that is irrelevant for a particular property being checked. Maybe SMACK times out on other benchmarks that have this problem. We can certainly not guarantee that SMACK can find all such problems.

Having said that, I think we should certainly try to fix the ones that SMACK does find, such as the ones that @Guoanshisb reported. I hope you agree with that.

Finally, if folks who submitted these benchmarks don't have time to fix them, they we can give it a try. Just let us know ASAP and we will try to propose a patch.

from sv-benchmarks.

mutilin avatar mutilin commented on May 30, 2024

See #227, #228, #229 for examples N1, N2, N3

from sv-benchmarks.

PavelAndrianov avatar PavelAndrianov commented on May 30, 2024

@Guoanshisb In the benchmark ldv-linux-3.16-rc1/205_9a_array_safes_linux-3.16-rc1.tar.xz-205_9a-drivers--net--usb--rtl8150.ko-entry_point_true-unreach-call.cil.out.c (the fourth one) rtl8150_probe could not be called before rtl8150_driver_init, which correctly allocates memory for rtl8150_driver_group1

from sv-benchmarks.

tautschnig avatar tautschnig commented on May 30, 2024

@Guoanshisb With @Andrianovpavel's further comment, are all issues covered by either a pull request or that final comment? If so, this issue should be closed.

from sv-benchmarks.

shaobo-he avatar shaobo-he commented on May 30, 2024

Hi @mutilin @Andrianovpavel ,

Sorry for the late reply.

SMACK still reports bugs for these benchmarks. For example, in N1, var_group_4 is calloced, so __cil_tmp23 at line 8285 is equal to the return value of calloc + 1600. __cil_tmp24 at line 8286 is the deference of __cil_tmp23 which equals to 0 (calloced memory). __cil_tmp26 at line 8288 will be 360, which is not initialized. __cil_tmp27 at line 8289 is the deference of __cil_tmp26 which can be any value. In line 8295, a function pointer is called which is the deference of __cil_tmp27 . So a function that results in the assertion failure will be called since *__cil_tmp27 could alias with any function.

It seems that you may have to initialize the structure in a complete way.

Please let know if it makes sense.

from sv-benchmarks.

shaobo-he avatar shaobo-he commented on May 30, 2024

@Andrianovpavel With respect to the fourth benchmark, rtl8150_driver_group1 got the return value of ldv_zalloc, which can return a NULL pointer.

from sv-benchmarks.

PavelAndrianov avatar PavelAndrianov commented on May 30, 2024

@Guoanshisb Could you check the fix of the fourth issue?

from sv-benchmarks.

shaobo-he avatar shaobo-he commented on May 30, 2024

@Andrianovpavel I'm afraid your changes does not fix the issue. Please take a look at the error witness attached.
witness.txt

from sv-benchmarks.

shaobo-he avatar shaobo-he commented on May 30, 2024

@Andrianovpavel @mutilin May I ask what is your assumption on uninitialized function pointer dispatch?

from sv-benchmarks.

mutilin avatar mutilin commented on May 30, 2024

CPAchecker witness validator could not confirm the witness.txt in 90 sec.
Is there any confirmation from the other validators?

from sv-benchmarks.

zvonimir avatar zvonimir commented on May 30, 2024

Why don't you run it without this 90 seconds time out?
This is not the competition, but rather an attempt to fix bugs in SV-COMP benchmarks, and so enforcing this time out makes no sense to me.
Also, if CPAChecker cannot find this bug in the first place, then why do you think it would be able to discharge our witness?

from sv-benchmarks.

mutilin avatar mutilin commented on May 30, 2024

@zvonimir, of course, CPAchecker may fail as any other tool. I just try to understand what is the confedence in correctness of the witness.
@Guoanshisb, did commenting of function pointer calls help SMACK to prove true?

from sv-benchmarks.

shaobo-he avatar shaobo-he commented on May 30, 2024

@mutilin Yes, it seems so for some benchmarks. For other benchmarks that SMACK reported a false bug, commenting out function pointers does not help. We will look into them.

from sv-benchmarks.

PhilippWendler avatar PhilippWendler commented on May 30, 2024

@shaobo-he Is this fixed?

from sv-benchmarks.

PhilippWendler avatar PhilippWendler commented on May 30, 2024

@shaobo-he @mutilin @Andrianovpavel Is this fixed?

from sv-benchmarks.

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.