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

use assert(0) instead of exit(1) #1

Merged
merged 1 commit into from Dec 6, 2014
Merged

use assert(0) instead of exit(1) #1

merged 1 commit into from Dec 6, 2014

Conversation

ghost
Copy link

@ghost ghost commented Dec 1, 2014

When a fatal error (unaligned memory etc.) is detected, gf-complete 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

@ghost ghost assigned kmgreen2 Dec 1, 2014
When a fatal error (unaligned memory etc.) is detected, gf-complete 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>
kmgreen2 added a commit that referenced this pull request Dec 6, 2014
use assert(0) instead of exit(1)
@kmgreen2 kmgreen2 merged commit e0e400a into ceph:master Dec 6, 2014
dalgaaf added a commit that referenced this pull request Sep 6, 2015
Fix for Coverity issue:

CID 1297852 (#1 of 1): 'Constant'; variable guards dead code (DEADCODE)
 dead_error_begin: Execution cannot reach this statement:
  fprintf(stderr, "Code conta....
 Local variable no_default_flag is assigned only once, to a constant value,
  making it effectively constant throughout its scope. If this is not the
  intent, examine the logic to see if there is a missing assignment that
  would make no_default_flag not remain constant.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
dalgaaf added a commit that referenced this pull request Sep 6, 2015
Fix for Coverity issue:

CID 1297812 (#1 of 1): Constant variable guards dead code (DEADCODE)
 dead_error_begin: Execution cannot reach this statement: fprintf(stderr,
  "Code conta....
 Local variable no_default_flag is assigned only once, to a constant
  value, making it effectively constant throughout its scope. If this
  is not the intent, examine the logic to see if there is a missing
  assignment that would make no_default_flag not remain constant.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
dalgaaf added a commit that referenced this pull request Sep 6, 2015
Fix for Coverity issue (from Ceph):

CID 1193086 (#1 of 1): Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
 overflow_before_widen: Potentially overflowing expression 1 << g_r with type
  int (32 bits, signed) is evaluated using 32-bit arithmetic, and then used in
  a context that expects an expression of type uint64_t (64 bits, unsigned).

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
dalgaaf added a commit that referenced this pull request Sep 6, 2015
Fix for Coverity issue (from Ceph):

CID 1193087 (#1 of 1): Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
 overflow_before_widen: Potentially overflowing expression 1 << g_r with type
  int (32 bits, signed) is evaluated using 32-bit arithmetic, and then used
  in a context that expects an expression of type uint64_t (64 bits, unsigned).

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
dalgaaf added a commit that referenced this pull request Sep 6, 2015
Fix for Coverity issue (from Ceph):

CID 1193088 (#1 of 1): Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
 overflow_before_widen: Potentially overflowing expression 1 << g_s with type
 int (32 bits, signed) is evaluated using 32-bit arithmetic, and then used in
 a context that expects an expression of type uint64_t (64 bits, unsigned).

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
dalgaaf added a commit that referenced this pull request Sep 6, 2015
Fix for Coverity issue (from Ceph):

CID 1193089 (#1 of 1): Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
 overflow_before_widen: Potentially overflowing expression 1 << g_r with type
 int (32 bits, signed) is evaluated using 32-bit arithmetic, and then used in
 a context that expects an expression of type uint64_t (64 bits, unsigned).

CID 1193090 (#1 of 1): Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
 overflow_before_widen: Potentially overflowing expression 1 << g_s with type
 int (32 bits, signed) is evaluated using 32-bit arithmetic, and then used in
 a context that expects an expression of type uint64_t (64 bits, unsigned).

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
dalgaaf added a commit that referenced this pull request Sep 6, 2015
Fix for Coverity issue (from Ceph):

CID 1193086 (#1 of 1): Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
 overflow_before_widen: Potentially overflowing expression 1 << g_r with type
  int (32 bits, signed) is evaluated using 32-bit arithmetic, and then used in
  a context that expects an expression of type uint64_t (64 bits, unsigned).

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
(cherry picked from commit 98e5e37)
dalgaaf added a commit that referenced this pull request Sep 6, 2015
Fix for Coverity issue (from Ceph):

CID 1193087 (#1 of 1): Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
 overflow_before_widen: Potentially overflowing expression 1 << g_r with type
  int (32 bits, signed) is evaluated using 32-bit arithmetic, and then used
  in a context that expects an expression of type uint64_t (64 bits, unsigned).

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
(cherry picked from commit e127bb1)
dalgaaf added a commit that referenced this pull request Sep 6, 2015
Fix for Coverity issue (from Ceph):

CID 1193088 (#1 of 1): Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
 overflow_before_widen: Potentially overflowing expression 1 << g_s with type
 int (32 bits, signed) is evaluated using 32-bit arithmetic, and then used in
 a context that expects an expression of type uint64_t (64 bits, unsigned).

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
(cherry picked from commit 1aef869)
dalgaaf added a commit that referenced this pull request Sep 6, 2015
Fix for Coverity issue (from Ceph):

CID 1193089 (#1 of 1): Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
 overflow_before_widen: Potentially overflowing expression 1 << g_r with type
 int (32 bits, signed) is evaluated using 32-bit arithmetic, and then used in
 a context that expects an expression of type uint64_t (64 bits, unsigned).

CID 1193090 (#1 of 1): Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
 overflow_before_widen: Potentially overflowing expression 1 << g_s with type
 int (32 bits, signed) is evaluated using 32-bit arithmetic, and then used in
 a context that expects an expression of type uint64_t (64 bits, unsigned).

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
(cherry picked from commit 2f6db51)
dalgaaf added a commit that referenced this pull request Sep 6, 2015
Fix for Coverity issue (from Ceph):

CID 1193086 (#1 of 1): Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
 overflow_before_widen: Potentially overflowing expression 1 << g_r with type
  int (32 bits, signed) is evaluated using 32-bit arithmetic, and then used in
  a context that expects an expression of type uint64_t (64 bits, unsigned).

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
(cherry picked from commit 98e5e37)
dalgaaf added a commit that referenced this pull request Sep 6, 2015
Fix for Coverity issue (from Ceph):

CID 1193087 (#1 of 1): Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
 overflow_before_widen: Potentially overflowing expression 1 << g_r with type
  int (32 bits, signed) is evaluated using 32-bit arithmetic, and then used
  in a context that expects an expression of type uint64_t (64 bits, unsigned).

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
(cherry picked from commit e127bb1)
dalgaaf added a commit that referenced this pull request Sep 6, 2015
Fix for Coverity issue (from Ceph):

CID 1193088 (#1 of 1): Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
 overflow_before_widen: Potentially overflowing expression 1 << g_s with type
 int (32 bits, signed) is evaluated using 32-bit arithmetic, and then used in
 a context that expects an expression of type uint64_t (64 bits, unsigned).

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
(cherry picked from commit 1aef869)
dalgaaf added a commit that referenced this pull request Sep 6, 2015
Fix for Coverity issue (from Ceph):

CID 1193089 (#1 of 1): Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
 overflow_before_widen: Potentially overflowing expression 1 << g_r with type
 int (32 bits, signed) is evaluated using 32-bit arithmetic, and then used in
 a context that expects an expression of type uint64_t (64 bits, unsigned).

CID 1193090 (#1 of 1): Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
 overflow_before_widen: Potentially overflowing expression 1 << g_s with type
 int (32 bits, signed) is evaluated using 32-bit arithmetic, and then used in
 a context that expects an expression of type uint64_t (64 bits, unsigned).

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
(cherry picked from commit 2f6db51)
reneme added a commit to reneme/gf-complete that referenced this pull request Jul 19, 2016
* commit 'eacc8f43281bba317a29d52e02636de7a699b4dc':
  add CMake installation routine
  FIX: bzero() windows workaround
  Remove unnecessary (POSIX) <getopt.h> from tests
  Remove unnecessary (POSIX) <getopt.h>
  FIX: platform independence of CPUID helpers
  check if SSE4 PCLMUL is available
  Refactor: Rename cmcpuid.c -> cpuid_simd.c
  add compiler flags to unit tests
  remove INTEL_ from config.h
  set compiler flags accordingly
  check for SSS3 as well
  generation of config.h
  FIX: CPUID feature detection
  add CPUID routine to CMakeLists.txt
  add rudimentary CMake-based build system
  .gitignore
  FIX: #ifdef instead of #if
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant