Comments (17)
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.
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.
@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.
See #227, #228, #229 for examples N1, N2, N3
from sv-benchmarks.
@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.
@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.
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.
@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.
@Guoanshisb Could you check the fix of the fourth issue?
from sv-benchmarks.
@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.
@Andrianovpavel @mutilin May I ask what is your assumption on uninitialized function pointer dispatch?
from sv-benchmarks.
CPAchecker witness validator could not confirm the witness.txt in 90 sec.
Is there any confirmation from the other validators?
from sv-benchmarks.
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.
@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.
@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.
@shaobo-he Is this fixed?
from sv-benchmarks.
@shaobo-he @mutilin @Andrianovpavel Is this fixed?
from sv-benchmarks.
Related Issues (20)
- Tasks in seq-mthreaded wrongly marked as non-terminating HOT 2
- Task ntdrivers/floppy2 is not memory safe
- Task ntdrivers/diskperf.i.cil-1.c is not memory safe HOT 2
- ntdrivers/parport.i.cil-2 is not memory safe
- LDV tasks with undefined behaviour and/or wrong verdicts HOT 3
- cut-2 and od-1 from busy-box are not memory safe HOT 1
- Undefined behavior in two AWS benchmarks
- MemSafety - unset subproperty for false verdict
- Incorrect Verification Task
- geo1-ll.c can overflow HOT 3
- Implementation-defined behaviour HOT 3
- SV-COMP concurrency benchmarks with data races HOT 3
- "Repeated" benchmarks in pthread-wmm
- why can echo-2.i overflow? HOT 2
- __builtin_unreachable() in LDV benchmarks HOT 3
- Benchmarks for weak memory models HOT 3
- Reachable error in pthread-ext/41_FreeBSD_abd_kbd_sliced
- Use of `__VERIFIER_nondet_*` functions that aren't specified in SV-COMP rules HOT 1
- Info on SV-COMP 2022? HOT 2
- Repository moved to GitLab HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sv-benchmarks.