Fedora build system sets global CFLAGS that include things like
mandatory security enhancements. It works for all other packages,
but ./configure in liberasurecode overrides provides CFLAGS.
See Red Hat bug for a humorous workaround:
https://bugzilla.redhat.com/show_bug.cgi?id=1208695#c4
Note that this patch does not monkey with the --debug side.
Hopefuly this does not violate KISS principle.
https://bitbucket.org/tsg-/liberasurecode/issue/13/decode-fails-for-many-cases-when-m-k
This fix includes:
1.) Proper buffer allocation for the 'missing_idxs' structure, which was not allocating enough
space when k > m.
2.) Checks to use header fields of parity fragments during decode when *no* data fragments
are available.
3.) Fixed the unit tests to properly handle the case where k <= m.
4.) Extended the unit test framework to support multiple tests per backend
5.) Added tests for all RS implementations: (4,8), (4,4), (10,10)
Also added additional test to test_xor_code to do an exhaustive decode test
(all possible 1 and 2 disk failures) and changed teh default liberasurecode
test to test (3, 3, 3).
Fedora packaging rules require ./configure --disable-static.
However, that ends with:
../src/.libs/liberasurecode.so: undefined reference to `dlopen'
The fix is to add a missing -ldl into flags of test_xor_hd_code.
when both data and parity was missing. The fix is to just call decode
when reconstructing parity, since it will have to do extra work anyway
when data is missing. We did a little extra work in ISA-L to do better,
but can save that for later, since 99% of the time decode will perform just
fine.
On the current code, get_fragment_partition might touch the
invlid memory area with minus index (that means a invalid header)
and it causes segmentation fault.
This fixes it to handle the minus index as a EBADHEADER and then
no segmentaition fault appeared on the case.
Without these checks, backend libraries not being available
is causing errors like in tests that are missing these checks:
$ make test
[snip]
ok 1 - test_create_backend_invalid_args: UNKNOWN
lt-liberasurecode_test: liberasurecode_test.c:276: test_destroy_backend_invalid_args: Assertion `desc > 0' failed. make: *** [test] Aborted (core dumped)
Closes issue #6