diff options
author | Arne Juul <arnej@yahoo-inc.com> | 2018-06-12 12:50:28 +0200 |
---|---|---|
committer | Arne Juul <arnej@yahoo-inc.com> | 2018-06-12 13:51:45 +0200 |
commit | 016e584f0ad5a071e13d75eb8ad5ddb46b8c54f5 (patch) | |
tree | 869d4e4a4c4b8a9f9ef691b2980009017dece9e6 /vsm/src | |
parent | 22796dddd3dc025018093783328ac87535ffecd9 (diff) |
use LOG_ABORT not just abort()
* abort() has the unfortunate effect that nothing is seen in the log,
just an event (which is usually not displayed); so ops people don't
see that the program is crashing at all.
* LOG_ABORT("message") will log an error with the message (and the file
and line) before calling abort(), so it's easy to see what happened.
* add or move <vespa/log/log.h> include and LOG_SETUP lines before
LOG_ABORT is used (or included).
Diffstat (limited to 'vsm/src')
-rw-r--r-- | vsm/src/vespa/vsm/searcher/fold.cpp | 4 | ||||
-rw-r--r-- | vsm/src/vespa/vsm/searcher/futf8strchrfieldsearcher.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/vsm/src/vespa/vsm/searcher/fold.cpp b/vsm/src/vespa/vsm/searcher/fold.cpp index 8974e669eba..903b1e43f79 100644 --- a/vsm/src/vespa/vsm/searcher/fold.cpp +++ b/vsm/src/vespa/vsm/searcher/fold.cpp @@ -48,7 +48,7 @@ const unsigned char * sse2_foldaa(const unsigned char * toFoldOrg, size_t sz, un folded[i] = __builtin_ia32_por128(_0_9, _a_z); #else # warning "Intel's icc compiler does not like __builtin_ia32_pxor128" - abort(); + LOG_ABORT("should not be reached"); #endif } return toFoldOrg+i*16; @@ -98,7 +98,7 @@ const unsigned char * sse2_foldua(const unsigned char * toFoldOrg, size_t sz, un folded[i] = __builtin_ia32_por128(_0_9, _a_z); #else # warning "Intel's icc compiler does not like __builtin_ia32_pxor128" - abort(); + LOG_ABORT("should not be reached"); #endif } return toFoldOrg+i*16; diff --git a/vsm/src/vespa/vsm/searcher/futf8strchrfieldsearcher.cpp b/vsm/src/vespa/vsm/searcher/futf8strchrfieldsearcher.cpp index ffbc43104e6..b388507aed5 100644 --- a/vsm/src/vespa/vsm/searcher/futf8strchrfieldsearcher.cpp +++ b/vsm/src/vespa/vsm/searcher/futf8strchrfieldsearcher.cpp @@ -95,7 +95,7 @@ inline const char * advance(const char * n, const v16qi zero) charMap = __builtin_ia32_pmovmskb128(tmp0); // 1 in charMap equals to '\0' in input buffer #else # warning "Intel's icc compiler does not like __builtin_ia32_xxxxx" - abort(); + LOG_ABORT("should not be reached"); #endif zeroCountSum += 16; } while (!charMap); @@ -112,7 +112,7 @@ inline const char * advance(const char * n, const v16qi zero) zeroMap = __builtin_ia32_pmovmskb128(tmpCurrent); // 1 in zeroMap equals to word character in input buffer #else # warning "Intel's icc compiler does not like __builtin_ia32_xxxxx" - abort(); + LOG_ABORT("should not be reached"); #endif zeroCountSum += 16; } while(!zeroMap); |