Commit 250a89cf authored by Sergey Vojtovich's avatar Sergey Vojtovich

MDEV-9283 - Debian: the Lintian complains about "shlib-calls-exit" in

            ha_oqgraph.so

exit() was called by Judy error handler. This patch overrides Judy error handler
so that it calls abort() instead of exit().
parent 994030c0
......@@ -23,6 +23,28 @@
*/
#include "oqgraph_judy.h"
/*
Currently the only active code that can return error is:
judy_bitset::reset()/J1U()
judy_bitset::setbit()/J1S()
In most cases errors are either about wrong parameters passed to Judy
functions or internal structures corruption. These definitely deserve
abnormal process termination instead of exit() as it is done by original
JUDYERROR.
TODO: there's one exception that should be handled properly though: OOM.
*/
#include <stdio.h>
#define JUDYERROR(CallerFile, CallerLine, JudyFunc, JudyErrno, JudyErrID) \
{ \
(void) fprintf(stderr, "File '%s', line %d: %s(), " \
"JU_ERRNO_* == %d, ID == %d\n", \
CallerFile, CallerLine, \
JudyFunc, JudyErrno, JudyErrID); \
abort(); \
}
#include <Judy.h>
void open_query::judy_bitset::clear()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment