Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOSHUFFLE bit in metainfo seems wrong (DeepState fuzzing) #94

Open
agroce opened this issue Dec 4, 2019 · 5 comments
Open

DOSHUFFLE bit in metainfo seems wrong (DeepState fuzzing) #94

agroce opened this issue Dec 4, 2019 · 5 comments

Comments

@agroce
Copy link

agroce commented Dec 4, 2019

DOSHUFFLE metainfo bit seems wrong:

RACE: Initialized test input buffer with data from `doshuffle.fail`
TRACE: Running: CBlosc2_RoundTrip from TestCBlosc2.cpp(34)
TRACE: TestCBlosc2.cpp(45): Performing 1 round trips.
TRACE: TestCBlosc2.cpp(48): *******************************   Starting run #0   *******************************
TRACE: TestCBlosc2.cpp(50): Type size = 1
TRACE: TestCBlosc2.cpp(52): Number of elements = 1
TRACE: TestCBlosc2.cpp(54): Buffer alignment = 32
TRACE: TestCBlosc2.cpp(56): Compression level = 0
TRACE: TestCBlosc2.cpp(58): Do shuffle = 1
TRACE: TestCBlosc2.cpp(61): Setting compressor to blosclz
TRACE: TestCBlosc2.cpp(65): Setting delta to 0
TRACE: TestCBlosc2.cpp(69): Buffer size = 1
TRACE: TestCBlosc2.cpp(89): # uncompressed bytes = 1
TRACE: TestCBlosc2.cpp(91): # compressed bytes = 33
TRACE: TestCBlosc2.cpp(92): block size = 1
TRACE: TestCBlosc2.cpp(97): type size = 1
TRACE: TestCBlosc2.cpp(99): DOSHUFFLE: 0
CRITICAL: TestCBlosc2.cpp(100): do shuffle = 0 but set to 1
ERROR: Failed: CBlosc2_RoundTrip
ERROR: Test case doshuffle.fail failed
@agroce
Copy link
Author

agroce commented Dec 4, 2019

Note this is REALLY rare:

CRITICAL: TestCBlosc2.cpp(100): do shuffle = 0 but set to 1
ERROR: Failed: CBlosc2_RoundTrip
INFO: Done fuzzing! Ran 195077 tests (3251 tests/second) with 459 failed/194618 passed/0 abandoned tests

@agroce
Copy link
Author

agroce commented Dec 4, 2019

The test above is fully reduced.

@agroce
Copy link
Author

agroce commented Dec 4, 2019

This does not go away once I restrict type_size to max 255

@FrancescAlted
Copy link
Member

Yeah, here the issue is due to the fact that when typesize is 1, the shuffle is doing nothing, so I decided to silently switch off the filter internally. But again, this makes the API unconsistent as you have shown. Probably what we can do is to just check internally that if typesize is 1, just do not call the shuffle filter, but still keep the shuffle flag active. Thanks!

@agroce
Copy link
Author

agroce commented Dec 5, 2019

Great! Is there any functionality other than what's in this harness you'd really like to see fuzzed? I started from https://github.com/Blosc/c-blosc2/blob/master/tests/test_compress_roundtrip.c and called any obviously core API elements I could think of and check something about.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants