summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorXavier Roche <xroche@users.noreply.github.com>2014-05-08 09:14:48 +0000
committerXavier Roche <xroche@users.noreply.github.com>2014-05-08 09:14:48 +0000
commit9a17499b99955b4e18366ef4fac9acffee2c2ede (patch)
tree1576d247c14f56ceeb716fc5abc43b52c879bd24 /src
parent91714c7a28ff50700db8fb8b2e47bd098c5f75d0 (diff)
Assertion handler (2)
Diffstat (limited to 'src')
-rw-r--r--src/htslib.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/htslib.c b/src/htslib.c
index b991ce2..b01892b 100644
--- a/src/htslib.c
+++ b/src/htslib.c
@@ -5112,6 +5112,10 @@ static int ssl_vulnerable(const char *version) {
return 0;
}
+static void default_inthash_asserthandler(void *arg, const char* exp, const char* file, int line) {
+ abortf_(exp, file, line);
+}
+
static int hts_init_ok = 0;
HTSEXT_API int hts_init(void) {
const char *dbg_env;
@@ -5133,6 +5137,9 @@ HTSEXT_API int hts_init(void) {
hts_debug_log_print("entering hts_init()"); /* debug */
+ /* Init hashtable default assertion handler. */
+ inthash_set_global_assert_handler(default_inthash_asserthandler);
+
/* Init threads (lazy init) */
htsthread_init();