2 * lttng-filter-validator.c
4 * LTTng UST filter bytecode validator.
6 * Copyright (C) 2010-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; only
11 * version 2.1 of the License.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
26 #include "lttng-filter.h"
28 #include <urcu/rculfhash.h>
29 #include "lttng-hash-helper.h"
32 * Number of merge points for hash table size. Hash table initialized to
33 * that size, and we do not resize, because we do not want to trigger
34 * RCU worker thread execution: fall-back on linear traversal if number
35 * of merge points exceeds this value.
37 #define DEFAULT_NR_MERGE_POINTS 128
38 #define MIN_NR_BUCKETS 128
39 #define MAX_NR_BUCKETS 128
41 /* merge point table node */
43 struct cds_lfht_node node
;
45 /* Context at merge point */
47 unsigned long target_pc
;
50 static unsigned long lttng_hash_seed
;
51 static unsigned int lttng_hash_seed_ready
;
54 int lttng_hash_match(struct cds_lfht_node
*node
, const void *key
)
56 struct lfht_mp_node
*mp_node
=
57 caa_container_of(node
, struct lfht_mp_node
, node
);
58 unsigned long key_pc
= (unsigned long) key
;
60 if (mp_node
->target_pc
== key_pc
)
67 int merge_points_compare(const struct vstack
*stacka
,
68 const struct vstack
*stackb
)
72 if (stacka
->top
!= stackb
->top
)
74 len
= stacka
->top
+ 1;
76 for (i
= 0; i
< len
; i
++) {
77 if (stacka
->e
[i
].type
!= stackb
->e
[i
].type
)
84 int merge_point_add_check(struct cds_lfht
*ht
, unsigned long target_pc
,
85 const struct vstack
*stack
)
87 struct lfht_mp_node
*node
;
88 unsigned long hash
= lttng_hash_mix((const void *) target_pc
,
91 struct cds_lfht_node
*ret
;
93 dbg_printf("Filter: adding merge point at offset %lu, hash %lu\n",
95 node
= zmalloc(sizeof(struct lfht_mp_node
));
98 node
->target_pc
= target_pc
;
99 memcpy(&node
->stack
, stack
, sizeof(node
->stack
));
100 ret
= cds_lfht_add_unique(ht
, hash
, lttng_hash_match
,
101 (const void *) target_pc
, &node
->node
);
102 if (ret
!= &node
->node
) {
103 struct lfht_mp_node
*ret_mp
=
104 caa_container_of(ret
, struct lfht_mp_node
, node
);
106 /* Key already present */
107 dbg_printf("Filter: compare merge points for offset %lu, hash %lu\n",
110 if (merge_points_compare(stack
, &ret_mp
->stack
)) {
111 ERR("Merge points differ for offset %lu\n",
120 * Binary comparators use top of stack and top of stack -1.
123 int bin_op_compare_check(struct vstack
*stack
, const char *str
)
125 if (unlikely(!vstack_ax(stack
) || !vstack_bx(stack
)))
128 switch (vstack_ax(stack
)->type
) {
133 switch (vstack_bx(stack
)->type
) {
146 switch (vstack_bx(stack
)->type
) {
165 ERR("type mismatch for '%s' binary operator\n", str
);
170 * Validate bytecode range overflow within the validation pass.
171 * Called for each instruction encountered.
174 int bytecode_validate_overflow(struct bytecode_runtime
*bytecode
,
175 void *start_pc
, void *pc
)
179 switch (*(filter_opcode_t
*) pc
) {
180 case FILTER_OP_UNKNOWN
:
183 ERR("unknown bytecode op %u\n",
184 (unsigned int) *(filter_opcode_t
*) pc
);
189 case FILTER_OP_RETURN
:
191 if (unlikely(pc
+ sizeof(struct return_op
)
192 > start_pc
+ bytecode
->len
)) {
203 case FILTER_OP_MINUS
:
204 case FILTER_OP_RSHIFT
:
205 case FILTER_OP_LSHIFT
:
206 case FILTER_OP_BIN_AND
:
207 case FILTER_OP_BIN_OR
:
208 case FILTER_OP_BIN_XOR
:
210 ERR("unsupported bytecode op %u\n",
211 (unsigned int) *(filter_opcode_t
*) pc
);
222 case FILTER_OP_EQ_STRING
:
223 case FILTER_OP_NE_STRING
:
224 case FILTER_OP_GT_STRING
:
225 case FILTER_OP_LT_STRING
:
226 case FILTER_OP_GE_STRING
:
227 case FILTER_OP_LE_STRING
:
228 case FILTER_OP_EQ_S64
:
229 case FILTER_OP_NE_S64
:
230 case FILTER_OP_GT_S64
:
231 case FILTER_OP_LT_S64
:
232 case FILTER_OP_GE_S64
:
233 case FILTER_OP_LE_S64
:
234 case FILTER_OP_EQ_DOUBLE
:
235 case FILTER_OP_NE_DOUBLE
:
236 case FILTER_OP_GT_DOUBLE
:
237 case FILTER_OP_LT_DOUBLE
:
238 case FILTER_OP_GE_DOUBLE
:
239 case FILTER_OP_LE_DOUBLE
:
241 if (unlikely(pc
+ sizeof(struct binary_op
)
242 > start_pc
+ bytecode
->len
)) {
249 case FILTER_OP_UNARY_PLUS
:
250 case FILTER_OP_UNARY_MINUS
:
251 case FILTER_OP_UNARY_NOT
:
252 case FILTER_OP_UNARY_PLUS_S64
:
253 case FILTER_OP_UNARY_MINUS_S64
:
254 case FILTER_OP_UNARY_NOT_S64
:
255 case FILTER_OP_UNARY_PLUS_DOUBLE
:
256 case FILTER_OP_UNARY_MINUS_DOUBLE
:
257 case FILTER_OP_UNARY_NOT_DOUBLE
:
259 if (unlikely(pc
+ sizeof(struct unary_op
)
260 > start_pc
+ bytecode
->len
)) {
270 if (unlikely(pc
+ sizeof(struct logical_op
)
271 > start_pc
+ bytecode
->len
)) {
278 case FILTER_OP_LOAD_FIELD_REF
:
280 ERR("Unknown field ref type\n");
284 case FILTER_OP_LOAD_FIELD_REF_STRING
:
285 case FILTER_OP_LOAD_FIELD_REF_SEQUENCE
:
286 case FILTER_OP_LOAD_FIELD_REF_S64
:
287 case FILTER_OP_LOAD_FIELD_REF_DOUBLE
:
289 if (unlikely(pc
+ sizeof(struct load_op
) + sizeof(struct field_ref
)
290 > start_pc
+ bytecode
->len
)) {
296 case FILTER_OP_LOAD_STRING
:
298 struct load_op
*insn
= (struct load_op
*) pc
;
299 uint32_t str_len
, maxlen
;
301 if (unlikely(pc
+ sizeof(struct load_op
)
302 > start_pc
+ bytecode
->len
)) {
307 maxlen
= start_pc
+ bytecode
->len
- pc
- sizeof(struct load_op
);
308 str_len
= strnlen(insn
->data
, maxlen
);
309 if (unlikely(str_len
>= maxlen
)) {
310 /* Final '\0' not found within range */
316 case FILTER_OP_LOAD_S64
:
318 if (unlikely(pc
+ sizeof(struct load_op
) + sizeof(struct literal_numeric
)
319 > start_pc
+ bytecode
->len
)) {
325 case FILTER_OP_LOAD_DOUBLE
:
327 if (unlikely(pc
+ sizeof(struct load_op
) + sizeof(struct literal_double
)
328 > start_pc
+ bytecode
->len
)) {
334 case FILTER_OP_CAST_TO_S64
:
335 case FILTER_OP_CAST_DOUBLE_TO_S64
:
336 case FILTER_OP_CAST_NOP
:
338 if (unlikely(pc
+ sizeof(struct cast_op
)
339 > start_pc
+ bytecode
->len
)) {
350 unsigned long delete_all_nodes(struct cds_lfht
*ht
)
352 struct cds_lfht_iter iter
;
353 struct lfht_mp_node
*node
;
354 unsigned long nr_nodes
= 0;
356 cds_lfht_for_each_entry(ht
, &iter
, node
, node
) {
359 ret
= cds_lfht_del(ht
, cds_lfht_iter_get_node(&iter
));
361 /* note: this hash table is never used concurrently */
374 int validate_instruction_context(struct bytecode_runtime
*bytecode
,
375 struct vstack
*stack
,
381 switch (*(filter_opcode_t
*) pc
) {
382 case FILTER_OP_UNKNOWN
:
385 ERR("unknown bytecode op %u\n",
386 (unsigned int) *(filter_opcode_t
*) pc
);
391 case FILTER_OP_RETURN
:
401 case FILTER_OP_MINUS
:
402 case FILTER_OP_RSHIFT
:
403 case FILTER_OP_LSHIFT
:
404 case FILTER_OP_BIN_AND
:
405 case FILTER_OP_BIN_OR
:
406 case FILTER_OP_BIN_XOR
:
408 ERR("unsupported bytecode op %u\n",
409 (unsigned int) *(filter_opcode_t
*) pc
);
416 ret
= bin_op_compare_check(stack
, "==");
423 ret
= bin_op_compare_check(stack
, "!=");
430 ret
= bin_op_compare_check(stack
, ">");
437 ret
= bin_op_compare_check(stack
, "<");
444 ret
= bin_op_compare_check(stack
, ">=");
451 ret
= bin_op_compare_check(stack
, "<=");
457 case FILTER_OP_EQ_STRING
:
458 case FILTER_OP_NE_STRING
:
459 case FILTER_OP_GT_STRING
:
460 case FILTER_OP_LT_STRING
:
461 case FILTER_OP_GE_STRING
:
462 case FILTER_OP_LE_STRING
:
464 if (!vstack_ax(stack
) || !vstack_bx(stack
)) {
465 ERR("Empty stack\n");
469 if (vstack_ax(stack
)->type
!= REG_STRING
470 || vstack_bx(stack
)->type
!= REG_STRING
) {
471 ERR("Unexpected register type for string comparator\n");
478 case FILTER_OP_EQ_S64
:
479 case FILTER_OP_NE_S64
:
480 case FILTER_OP_GT_S64
:
481 case FILTER_OP_LT_S64
:
482 case FILTER_OP_GE_S64
:
483 case FILTER_OP_LE_S64
:
485 if (!vstack_ax(stack
) || !vstack_bx(stack
)) {
486 ERR("Empty stack\n");
490 if (vstack_ax(stack
)->type
!= REG_S64
491 || vstack_bx(stack
)->type
!= REG_S64
) {
492 ERR("Unexpected register type for s64 comparator\n");
499 case FILTER_OP_EQ_DOUBLE
:
500 case FILTER_OP_NE_DOUBLE
:
501 case FILTER_OP_GT_DOUBLE
:
502 case FILTER_OP_LT_DOUBLE
:
503 case FILTER_OP_GE_DOUBLE
:
504 case FILTER_OP_LE_DOUBLE
:
506 if (!vstack_ax(stack
) || !vstack_bx(stack
)) {
507 ERR("Empty stack\n");
511 if ((vstack_ax(stack
)->type
!= REG_DOUBLE
&& vstack_ax(stack
)->type
!= REG_S64
)
512 || (vstack_bx(stack
)-> type
!= REG_DOUBLE
&& vstack_bx(stack
)->type
!= REG_S64
)) {
513 ERR("Unexpected register type for double comparator\n");
517 if (vstack_ax(stack
)->type
!= REG_DOUBLE
&& vstack_bx(stack
)->type
!= REG_DOUBLE
) {
518 ERR("Double operator should have at least one double register\n");
526 case FILTER_OP_UNARY_PLUS
:
527 case FILTER_OP_UNARY_MINUS
:
528 case FILTER_OP_UNARY_NOT
:
530 if (!vstack_ax(stack
)) {
531 ERR("Empty stack\n");
535 switch (vstack_ax(stack
)->type
) {
537 ERR("unknown register type\n");
542 ERR("Unary op can only be applied to numeric or floating point registers\n");
553 case FILTER_OP_UNARY_PLUS_S64
:
554 case FILTER_OP_UNARY_MINUS_S64
:
555 case FILTER_OP_UNARY_NOT_S64
:
557 if (!vstack_ax(stack
)) {
558 ERR("Empty stack\n");
562 if (vstack_ax(stack
)->type
!= REG_S64
) {
563 ERR("Invalid register type\n");
570 case FILTER_OP_UNARY_PLUS_DOUBLE
:
571 case FILTER_OP_UNARY_MINUS_DOUBLE
:
572 case FILTER_OP_UNARY_NOT_DOUBLE
:
574 if (!vstack_ax(stack
)) {
575 ERR("Empty stack\n");
579 if (vstack_ax(stack
)->type
!= REG_DOUBLE
) {
580 ERR("Invalid register type\n");
591 struct logical_op
*insn
= (struct logical_op
*) pc
;
593 if (!vstack_ax(stack
)) {
594 ERR("Empty stack\n");
598 if (vstack_ax(stack
)->type
!= REG_S64
) {
599 ERR("Logical comparator expects S64 register\n");
604 dbg_printf("Validate jumping to bytecode offset %u\n",
605 (unsigned int) insn
->skip_offset
);
606 if (unlikely(start_pc
+ insn
->skip_offset
<= pc
)) {
607 ERR("Loops are not allowed in bytecode\n");
615 case FILTER_OP_LOAD_FIELD_REF
:
617 ERR("Unknown field ref type\n");
621 case FILTER_OP_LOAD_FIELD_REF_STRING
:
622 case FILTER_OP_LOAD_FIELD_REF_SEQUENCE
:
624 struct load_op
*insn
= (struct load_op
*) pc
;
625 struct field_ref
*ref
= (struct field_ref
*) insn
->data
;
627 dbg_printf("Validate load field ref offset %u type string\n",
631 case FILTER_OP_LOAD_FIELD_REF_S64
:
633 struct load_op
*insn
= (struct load_op
*) pc
;
634 struct field_ref
*ref
= (struct field_ref
*) insn
->data
;
636 dbg_printf("Validate load field ref offset %u type s64\n",
640 case FILTER_OP_LOAD_FIELD_REF_DOUBLE
:
642 struct load_op
*insn
= (struct load_op
*) pc
;
643 struct field_ref
*ref
= (struct field_ref
*) insn
->data
;
645 dbg_printf("Validate load field ref offset %u type double\n",
650 case FILTER_OP_LOAD_STRING
:
655 case FILTER_OP_LOAD_S64
:
660 case FILTER_OP_LOAD_DOUBLE
:
665 case FILTER_OP_CAST_TO_S64
:
666 case FILTER_OP_CAST_DOUBLE_TO_S64
:
668 struct cast_op
*insn
= (struct cast_op
*) pc
;
670 if (!vstack_ax(stack
)) {
671 ERR("Empty stack\n");
675 switch (vstack_ax(stack
)->type
) {
677 ERR("unknown register type\n");
682 ERR("Cast op can only be applied to numeric or floating point registers\n");
690 if (insn
->op
== FILTER_OP_CAST_DOUBLE_TO_S64
) {
691 if (vstack_ax(stack
)->type
!= REG_DOUBLE
) {
692 ERR("Cast expects double\n");
699 case FILTER_OP_CAST_NOP
:
715 int validate_instruction_all_contexts(struct bytecode_runtime
*bytecode
,
716 struct cds_lfht
*merge_points
,
717 struct vstack
*stack
,
722 unsigned long target_pc
= pc
- start_pc
;
723 struct cds_lfht_iter iter
;
724 struct cds_lfht_node
*node
;
725 struct lfht_mp_node
*mp_node
;
728 /* Validate the context resulting from the previous instruction */
729 ret
= validate_instruction_context(bytecode
, stack
, start_pc
, pc
);
733 /* Validate merge points */
734 hash
= lttng_hash_mix((const void *) target_pc
, sizeof(target_pc
),
736 cds_lfht_lookup(merge_points
, hash
, lttng_hash_match
,
737 (const void *) target_pc
, &iter
);
738 node
= cds_lfht_iter_get_node(&iter
);
740 mp_node
= caa_container_of(node
, struct lfht_mp_node
, node
);
742 dbg_printf("Filter: validate merge point at offset %lu\n",
744 if (merge_points_compare(stack
, &mp_node
->stack
)) {
745 ERR("Merge points differ for offset %lu\n",
749 /* Once validated, we can remove the merge point */
750 dbg_printf("Filter: remove merge point at offset %lu\n",
752 ret
= cds_lfht_del(merge_points
, node
);
760 * >0: going to next insn.
761 * 0: success, stop iteration.
765 int exec_insn(struct bytecode_runtime
*bytecode
,
766 struct cds_lfht
*merge_points
,
767 struct vstack
*stack
,
772 void *next_pc
= *_next_pc
;
774 switch (*(filter_opcode_t
*) pc
) {
775 case FILTER_OP_UNKNOWN
:
778 ERR("unknown bytecode op %u\n",
779 (unsigned int) *(filter_opcode_t
*) pc
);
784 case FILTER_OP_RETURN
:
786 if (!vstack_ax(stack
)) {
787 ERR("Empty stack\n");
800 case FILTER_OP_MINUS
:
801 case FILTER_OP_RSHIFT
:
802 case FILTER_OP_LSHIFT
:
803 case FILTER_OP_BIN_AND
:
804 case FILTER_OP_BIN_OR
:
805 case FILTER_OP_BIN_XOR
:
807 ERR("unsupported bytecode op %u\n",
808 (unsigned int) *(filter_opcode_t
*) pc
);
819 case FILTER_OP_EQ_STRING
:
820 case FILTER_OP_NE_STRING
:
821 case FILTER_OP_GT_STRING
:
822 case FILTER_OP_LT_STRING
:
823 case FILTER_OP_GE_STRING
:
824 case FILTER_OP_LE_STRING
:
825 case FILTER_OP_EQ_S64
:
826 case FILTER_OP_NE_S64
:
827 case FILTER_OP_GT_S64
:
828 case FILTER_OP_LT_S64
:
829 case FILTER_OP_GE_S64
:
830 case FILTER_OP_LE_S64
:
831 case FILTER_OP_EQ_DOUBLE
:
832 case FILTER_OP_NE_DOUBLE
:
833 case FILTER_OP_GT_DOUBLE
:
834 case FILTER_OP_LT_DOUBLE
:
835 case FILTER_OP_GE_DOUBLE
:
836 case FILTER_OP_LE_DOUBLE
:
839 if (vstack_pop(stack
)) {
843 if (!vstack_ax(stack
)) {
844 ERR("Empty stack\n");
848 vstack_ax(stack
)->type
= REG_S64
;
849 next_pc
+= sizeof(struct binary_op
);
854 case FILTER_OP_UNARY_PLUS
:
855 case FILTER_OP_UNARY_MINUS
:
856 case FILTER_OP_UNARY_NOT
:
857 case FILTER_OP_UNARY_PLUS_S64
:
858 case FILTER_OP_UNARY_MINUS_S64
:
859 case FILTER_OP_UNARY_NOT_S64
:
862 if (!vstack_ax(stack
)) {
863 ERR("Empty stack\n");
867 vstack_ax(stack
)->type
= REG_S64
;
868 next_pc
+= sizeof(struct unary_op
);
872 case FILTER_OP_UNARY_PLUS_DOUBLE
:
873 case FILTER_OP_UNARY_MINUS_DOUBLE
:
874 case FILTER_OP_UNARY_NOT_DOUBLE
:
877 if (!vstack_ax(stack
)) {
878 ERR("Empty stack\n");
882 vstack_ax(stack
)->type
= REG_DOUBLE
;
883 next_pc
+= sizeof(struct unary_op
);
891 struct logical_op
*insn
= (struct logical_op
*) pc
;
894 /* Add merge point to table */
895 merge_ret
= merge_point_add_check(merge_points
,
896 insn
->skip_offset
, stack
);
901 /* Continue to next instruction */
902 /* Pop 1 when jump not taken */
903 if (vstack_pop(stack
)) {
907 next_pc
+= sizeof(struct logical_op
);
912 case FILTER_OP_LOAD_FIELD_REF
:
914 ERR("Unknown field ref type\n");
918 case FILTER_OP_LOAD_FIELD_REF_STRING
:
919 case FILTER_OP_LOAD_FIELD_REF_SEQUENCE
:
921 if (vstack_push(stack
)) {
925 vstack_ax(stack
)->type
= REG_STRING
;
926 next_pc
+= sizeof(struct load_op
) + sizeof(struct field_ref
);
929 case FILTER_OP_LOAD_FIELD_REF_S64
:
931 if (vstack_push(stack
)) {
935 vstack_ax(stack
)->type
= REG_S64
;
936 next_pc
+= sizeof(struct load_op
) + sizeof(struct field_ref
);
939 case FILTER_OP_LOAD_FIELD_REF_DOUBLE
:
941 if (vstack_push(stack
)) {
945 vstack_ax(stack
)->type
= REG_DOUBLE
;
946 next_pc
+= sizeof(struct load_op
) + sizeof(struct field_ref
);
950 case FILTER_OP_LOAD_STRING
:
952 struct load_op
*insn
= (struct load_op
*) pc
;
954 if (vstack_push(stack
)) {
958 vstack_ax(stack
)->type
= REG_STRING
;
959 next_pc
+= sizeof(struct load_op
) + strlen(insn
->data
) + 1;
963 case FILTER_OP_LOAD_S64
:
965 if (vstack_push(stack
)) {
969 vstack_ax(stack
)->type
= REG_S64
;
970 next_pc
+= sizeof(struct load_op
)
971 + sizeof(struct literal_numeric
);
975 case FILTER_OP_LOAD_DOUBLE
:
977 if (vstack_push(stack
)) {
981 vstack_ax(stack
)->type
= REG_DOUBLE
;
982 next_pc
+= sizeof(struct load_op
)
983 + sizeof(struct literal_double
);
987 case FILTER_OP_CAST_TO_S64
:
988 case FILTER_OP_CAST_DOUBLE_TO_S64
:
991 if (!vstack_ax(stack
)) {
992 ERR("Empty stack\n");
996 vstack_ax(stack
)->type
= REG_S64
;
997 next_pc
+= sizeof(struct cast_op
);
1000 case FILTER_OP_CAST_NOP
:
1002 next_pc
+= sizeof(struct cast_op
);
1008 *_next_pc
= next_pc
;
1013 * Never called concurrently (hash seed is shared).
1015 int lttng_filter_validate_bytecode(struct bytecode_runtime
*bytecode
)
1017 struct cds_lfht
*merge_points
;
1018 void *pc
, *next_pc
, *start_pc
;
1020 struct vstack stack
;
1022 vstack_init(&stack
);
1024 if (!lttng_hash_seed_ready
) {
1025 lttng_hash_seed
= time(NULL
);
1026 lttng_hash_seed_ready
= 1;
1029 * Note: merge_points hash table used by single thread, and
1030 * never concurrently resized. Therefore, we can use it without
1031 * holding RCU read-side lock and free nodes without using
1034 merge_points
= cds_lfht_new(DEFAULT_NR_MERGE_POINTS
,
1035 MIN_NR_BUCKETS
, MAX_NR_BUCKETS
,
1037 if (!merge_points
) {
1038 ERR("Error allocating hash table for bytecode validation\n");
1041 start_pc
= &bytecode
->data
[0];
1042 for (pc
= next_pc
= start_pc
; pc
- start_pc
< bytecode
->len
;
1044 if (bytecode_validate_overflow(bytecode
, start_pc
, pc
) != 0) {
1045 ERR("filter bytecode overflow\n");
1049 dbg_printf("Validating op %s (%u)\n",
1050 print_op((unsigned int) *(filter_opcode_t
*) pc
),
1051 (unsigned int) *(filter_opcode_t
*) pc
);
1054 * For each instruction, validate the current context
1055 * (traversal of entire execution flow), and validate
1056 * all merge points targeting this instruction.
1058 ret
= validate_instruction_all_contexts(bytecode
, merge_points
,
1059 &stack
, start_pc
, pc
);
1062 ret
= exec_insn(bytecode
, merge_points
, &stack
, &next_pc
, pc
);
1067 if (delete_all_nodes(merge_points
)) {
1069 ERR("Unexpected merge points\n");
1073 if (cds_lfht_destroy(merge_points
, NULL
)) {
1074 ERR("Error destroying hash table\n");