Commit Graph

10 Commits (master)

Author SHA1 Message Date
Loic Dachary 36008101d5 use assert(0) instead of exit(1)
When a fatal error (unaligned memory etc.) is detected, jerasure
should assert(3) instead of exit(3) to give a chance to the calling
program to catch the exception and display a stack trace. Although it is
possible for gdb to display the stack trace and break on exit, libraries
are not usually expected to terminate the calling program in this way.

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-12-15 12:08:37 +01:00
Danny Al-Gaaf a21b2733a9 jerasure.c: add more checks for talloc/malloc results
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-27 20:27:23 +02:00
Danny Al-Gaaf 31810e1fdc jerasure.c: add check for result of malloc()
Add check for bitmatrix and return NULL if malloc failed.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-27 18:56:52 +02:00
Danny Al-Gaaf b14af86424 jerasure.c: free memory before return in error case
Fix for Coverity issue from Ceph project:

CID 1093211 (#1 of 1): Resource leak (RESOURCE_LEAK)
 20. leaked_storage: Variable "ind_to_row" going out of scope leaks
 the storage it points to.

CID 1093212 (#1 of 1): Resource leak (RESOURCE_LEAK)
 20. leaked_storage: Variable "row_ids" going out of scope leaks the
 storage it points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-22 20:52:07 +02:00
Danny Al-Gaaf 6d8fbc8b81 jerasure.c: fix memory leak in error case
Check matrix for NULL before call talloc().

CID 1093213 (#1 of 1): Resource leak (RESOURCE_LEAK)
 4. leaked_storage: Variable "bitmatrix" going out of scope
 leaks the storage it points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-22 20:36:32 +02:00
Loic Dachary cdc99aadc9 silence warning about bestrow used uninitialized
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-03-30 10:55:46 +02:00
Loic Dachary 87f301084d remove unused variables
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-03-06 01:38:29 +01:00
Jim Plank be40b4e549 Revision 2.0 is ready for prime time! 2014-01-25 10:55:29 -05:00
Kevin Greenan c4ab254bbc Do SIMD XOR, where possible! 2013-12-20 08:21:46 -08:00
Kevin Greenan 00a17c0a7a Setup autoconf to work with Jerasure 2013-12-04 23:08:08 -08:00