Closed skliper closed 2 years ago
The cause is due to a buffer overflow in the test. updated_offsets
and updated_sizes
are undersized at 10 where the initial count is up to 10 and 1 gets added. In the setup it'll write to the updated offsets up to initial_count + 1.
Really this is a problematic test, since it's random you only see the overflow in random results (likely not caught by a single static analysis run)... there's over 200 lines of test code to cover 13 lines of unit code with 1 decision and 2 conditions. There's 0 added value for random values in the results, and so on.
@astrogeco Looks like this was merged, why was it reopened?
Closing. I'm not sure why this keeps happening.
Checklist (Please check before submitting)
Describe the bug Not clear what the issue is, but random values being used in test. Output observed:
To Reproduce Built on 32 bit system, ran the
coverage-cf-cf_chunk-testrunner
test repeatedly (maybe 3 errors in 10)?Expected behavior No failures.
Code snips https://github.com/nasa/CF/blob/dafc8aeaaa5c21aa39ddc9f4348c13fbcb363834/unit-test/cf_chunk_tests.c#L533-L590
System observed on:
Additional context
86
Reporter Info Jacob Hageman - NASA/GSFC