Commit Graph

247 Commits (master)

Author SHA1 Message Date
Loic Dachary dfffff2740 remove dead code in create_gf_from_argv
Since there can only be one -m, base cannot be set by -m COMPOSITE and
then deallocated on the second -m if it is bugous. The second -m will
exit on error at _gf_errno = GF_E_TWOMULT;.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-09-17 10:08:37 +02:00
Loic Dachary 7c06749ab8 disable gf_error_check test that requires >> 64
Because >> 64 does not have a defined behavior.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-09-17 10:08:37 +02:00
Kevin Greenan 87d7e8fbb0 Merged in beol/gf-complete (pull request #23)
On CPU that doesn't support SSE4.2 instructions set, this will fail
2014-08-23 11:14:11 -07:00
Leo Laksmana 6f160921dc On CPU that doesn't support SSE4.2 instructions set, this will fail
because incorrect header is included.

smmintrin.h => SSE4.1
nmmintrin.h => SSE4.2
2014-08-23 18:08:31 +08:00
Adam Disney c25310f215 Removed comments marking CARRY_FREE_GK additions. 2014-06-16 13:04:15 -04:00
Thomas Goirand b505099178 Fixed debian/libgf-complete1.symbols to have the correct version. 2014-06-17 00:51:26 +08:00
Thomas Goirand 73b9cedc2b Deleted include/config.h.in~ 2014-06-17 00:48:48 +08:00
Thomas Goirand 926b1b76c4 Packaging upstream v1.0.2 2014-06-17 00:48:11 +08:00
Thomas Goirand bdfae11e32 Merge tag 'v1.0.2' into debian/unstable
Adding tag for easier downstream tracking.
2014-06-17 00:47:42 +08:00
Adam Disney f48f2d38af Merge remote-tracking branch 'dalgaaf/wip-da-sca-20140513' 2014-06-16 12:44:45 -04:00
Adam Disney 5be1fecbcb Fixed a few minor warnings when running autogen.sh. 2014-06-16 12:27:19 -04:00
Adam Disney d08de3bdcb Merge remote-tracking branch 'jayrde/wip-autoconf-cleanup'
Conflicts:
	.gitignore
	INSTALL
	Makefile.in
	aclocal.m4
	config.guess
	config.sub
	configure
	examples/Makefile.in
	include/config.h.in
	include/config.h.in~
	install-sh
	ltmain.sh
	m4/libtool.m4
	m4/ltversion.m4
	missing
	src/Makefile.in
	test/Makefile.in
	tools/Makefile.in
2014-06-16 12:24:06 -04:00
Kevin Greenan 259d91ad43 autoreconf'd to reflect addition of --disable-sse 2014-06-09 12:36:05 -07:00
Kevin Greenan a11dc931ff Adding option to disable SSE in autoconf script 2014-06-09 11:21:01 -07:00
Kevin Greenan 9311b4fc10 Removed PDF from the repo and added a note in the README that describes how to
get the manual.
2014-06-09 08:34:50 -07:00
Adam Disney 6bb1ebb9f4 Implemented CARRY_FREE_GK. Sections added are tagged with a comment //ADAM
for easy navigation.
2014-06-06 13:09:04 -04:00
Thomas Goirand f56efaec5e Added initial debian folder. 2014-06-06 16:17:46 +00:00
Danny Al-Gaaf 5832024d68 gf_w32.c: remove dead assignment with no effect
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-14 16:15:52 +02:00
Danny Al-Gaaf 40b9f8f968 gf_time.c: remove dead assignment to 'elapsed'
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-14 16:12:59 +02:00
Danny Al-Gaaf 83f1eee1c2 gf_w32.c: fix/remove some dead assignments
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-14 16:10:49 +02:00
Danny Al-Gaaf bfa6671fa9 gf_w16.c: fix/remove some dead assignments
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-14 16:09:55 +02:00
Danny Al-Gaaf eb3bb91d84 gf_w128.c: remove some dead assignments
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-14 16:00:05 +02:00
Danny Al-Gaaf 925802a06a gf_w8.c: fix dead assignment report from scan-build
Fix dead assignment in case of INTEL_SSSE3 defined.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-14 15:44:06 +02:00
Danny Al-Gaaf c0dd8e0fe2 gf_w64.c: remove dead assignments and unused variable 'm2'
The 'm2' variable in gf_w64_clm_multiply_region_from_single_2() isn't
used except for calculations on 'm2' which are not used later in the code.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-14 10:49:20 +02:00
Danny Al-Gaaf 277819a972 gf_w64.c: remove dead assigments in gf_w64_shift_multiply()
These assigments are never used and directly overwritten later
in the function.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-14 10:46:05 +02:00
Danny Al-Gaaf 3e242830b0 tools/gf_poly.c: fix undefined allocation of 0 bytes
Due to man page of malloc the behaviour in case of allocation size of
0 bytes is undefined: "If size was equal to 0, either NULL or a
pointer suitable to be passed  to free() is returned"

Fix for clang scan-build report:

Unix API     Undefined allocation of 0 bytes (CERT MEM04-C; CWE-131)

210 poly = (gf_general_t *) malloc(sizeof(gf_general_t)*(n+1));

    9 Call to 'malloc' has an allocation size of 0 bytes

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-14 09:55:57 +02:00
Danny Al-Gaaf f6936562b2 gf_w32.c: fix dereference of undefined pointer value
Check for array boundaries of 't' in while loop header.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-13 19:29:32 +02:00
Danny Al-Gaaf cb87c41f28 test/gf_unit.c: free memory after usage
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-13 19:24:47 +02:00
Danny Al-Gaaf 33492be5db gf_inline_time.c: fix memory leak
Free all with malloc allocated memory before exit. Change
if checks against 'w' to be a if-else check to prevent checking
after already matched.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-13 19:06:13 +02:00
Kevin Greenan 9d53ea590b Merged in dalgaaf/gf-complete/wip-da-coverity-rebased (pull request #21)
Fixes for some issues found via Coverity in the Ceph project.
2014-04-27 09:24:00 -07:00
Danny Al-Gaaf df2c84d232 gf_w4.c: remove some dead code
Fix for coverity issue from Ceph project:

CID 1193093 (#1 of 1): Structurally dead code (UNREACHABLE)
 unreachable: This code cannot be reached: "return gf_w4_double_table_i...".

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-22 20:08:27 +02:00
Danny Al-Gaaf 0c04d6e3db gf.c: fix pointless expression
Remove identical expression, reorganize code in gf_error_check()
to be identical handled trough all checks. Removed (raltmap && arg1 != 4)
check - this is dead code (arg1 is always 4 in this code path).

Fix for coverity issue from Ceph project:

CID 1193071 (#1 of 1): Same on both sides (CONSTANT_EXPRESSION_RESULT)
 pointless_expression: The expression (arg1 == 4 && arg2 == 32) ||
 (arg1 == 4 && arg2 == 32) does not accomplish anything because it
 evaluates to either of its identical operands, arg1 == 4 && arg2 == 32.
 Did you intend the operands to be different?

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-22 20:08:27 +02:00
Danny Al-Gaaf 13f0e8888f fix comment/message on GF_E_SP128_A/GF_E_SP128_S
Swap comments/messages on GF_E_SP128_A/GF_E_SP128_S.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-22 20:08:26 +02:00
Danny Al-Gaaf fa5ec8112b gf_w8.c: add missing breaks
Since there is no comment indicating fallthrough on purpose added a
break in switch value 5 and 6.

Fix for coverity issue from Ceph project:

CID 1193084 (#1 of 1): Missing break in switch (MISSING_BREAK)
 unterminated_case: This case (value 5) is not terminated by a 'break'
 statement.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-22 20:08:26 +02:00
Danny Al-Gaaf 3b6364e5f2 gf_w4.c: add missing breaks
Since there is no comment indicating fallthrough on purpose added a
break in switch value 5 and 6.

Fix for coverity issue from Ceph project:

CID 1193082 (#1 of 1): Missing break in switch (MISSING_BREAK)
 unterminated_case: This case (value 5) is not terminated by a 'break'
 statement.

CID 1193083 (#1 of 1): Missing break in switch (MISSING_BREAK)
 unterminated_case: This case (value 6) is not terminated by a 'break'
 statement.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-22 20:08:26 +02:00
Danny Al-Gaaf 86b994df05 gf_w32.c: add missing breaks
Since there is no comment indicating fallthrough on purpose added a
break in switch value 3 and 5/before default.

Fix for coverity issue from Ceph project:

CID 1193080 (#1 of 1): Missing break in switch (MISSING_BREAK)
 unterminated_case: This case (value 3) is not terminated by a 'break'
 statement.

CID 1193081 (#1 of 1): Missing break in switch (MISSING_BREAK)
 unterminated_case: This case (value 5) is not terminated by a 'break'
 statement.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-22 20:08:26 +02:00
Danny Al-Gaaf e958b0437d gf_w16.c: add missing break
Since there is no comment indicating fallthrough on purpose added a
break in switch value 5/before default.

Fix for coverity issue from Ceph project:

CID 1193079 (#1 of 1): Missing break in switch (MISSING_BREAK)
 unterminated_case: This case (value 5) is not terminated by a 'break'
 statement.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-22 20:08:26 +02:00
Danny Al-Gaaf 173f82442d gf_general.c: fix pointless expression
Instead of checking w128[0] twice check for w128[0] and w128[1].

Fix for coverity issue from Ceph project:

CID 1193072 (#1 of 1): Same on both sides (CONSTANT_EXPRESSION_RESULT)
 pointless_expression: The expression v1->w128[0] == v2->w128[0] &&
 v1->w128[0] == v2->w128[0] does not accomplish anything because it
 evaluates to either of its identical operands, v1->w128[0] == v2->w128[0].
 Did you intend the operands to be different?

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-22 20:08:26 +02:00
Kevin Greenan 1559c2b515 Merged in dachary/gf-complete/wip-uint-8 (pull request #19)
prefer uint8_t to char in pointer arithmetic
2014-04-10 19:01:49 -07:00
Kevin Greenan e26cd5aa37 Merged in dachary/gf-complete/wip-hard-coded-note (pull request #18)
TODO reminder for KMG/JSP about hardcoded constant
2014-04-10 10:46:20 -07:00
Loic Dachary a0ae760ed3 prefer uint8_t to char in pointer arithmetic
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-04-10 17:21:38 +02:00
Loic Dachary 564f019f49 Show pointer arithmetic warnings by default
So that a void* being used in pointer arithmetic does not go unnoticed.

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-04-10 17:20:42 +02:00
Loic Dachary b5ac2580c2 TODO reminder for KMG/JSP about hardcoded constant
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-04-10 16:59:38 +02:00
Kevin Greenan 8a96cbb371 Ran autogen to pick-up the changes needed to run 'make check' 2014-04-02 10:35:21 -07:00
Kevin Greenan 31baa17519 Merged in dachary/gf-complete/wip-make-check (pull request #11)
add make check target and basic tests
2014-04-02 10:21:40 -07:00
Loic Dachary c18b97cd02 add make check target and basic tests
To conveniently run tests as

 $ make check
 ============================================================================
 Testsuite summary for gf-complete 1.0
 ============================================================================
 # TOTAL: 1
 # PASS:  1
 # SKIP:  0
 # XFAIL: 0
 # FAIL:  0
 # XPASS: 0
 # ERROR: 0
 ============================================================================

The run-tests.sh script loops over gf_methods and is introduced because
autotools does not allow tests to have parameters in the Makefile.am

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-04-02 17:57:15 +02:00
Kevin Greenan 4c84a3b650 Merged in dachary/gf-complete/wip-compilation-warnings (pull request #12)
fix void* arithmetic compilation warning
2014-03-31 08:53:14 -07:00
Kevin Greenan 37d6a1b217 Merged in dachary/gf-complete/wip-sse4 (pull request #13)
do not compile if used in SSE4 code path only
2014-03-31 08:42:20 -07:00
Kevin Greenan 1aef6384e7 Merged in dachary/gf-complete/wip-gitignore (pull request #10)
.gitignore: ignore autotools stuff
2014-03-31 08:04:23 -07:00
Loic Dachary d569220629 do not compile if used in SSE4 code path only
Acknowledge that gf_w128_split_4_128_multiply_region and
gf_w128_split_4_128_sse_multiply_region are only used when the
INTEL_SSE4 flag is present, even though they only need INTEL_SSSE3

It suppresses a compilation warning complaining about them not being
used if INTEL_SSE4 is absent and INTEL_SSSE3 is present.

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-03-30 00:06:48 +01:00