sosy-lab / sv-benchmarks

Collection of Verification Tasks (MOVED, please follow the link)
https://gitlab.com/sosy-lab/benchmarking/sv-benchmarks
184 stars 169 forks source link

Seeded an off-by-one bug #1211

Closed zvonimir closed 4 years ago

zvonimir commented 4 years ago

Seeded what I think is a reasonable bug into this benchmark to create some benchmarks with bugs in this category. It is a first step towards doing #1183. If people are reasonably happy with this one, I'll do more.

zvonimir commented 4 years ago

This is the diff with the original file:

7894c7894
<     for (size_t i = 0; i < array_len; ++i) {
---
>     for (size_t i = 0; i < array_len - 1; ++i) {
dbeyer commented 4 years ago

I am merging, but I thought about the following:

Could you please address this in a separete PR? (I do not want to hold it back because people obviously want to play around with it.)

zvonimir commented 4 years ago

@dbeyer good suggestions! I'll add a comment with each bug I seed. Btw, where are the original .c sources? I can't find them anywhere in the repo, but maybe I missed them.