Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d731ce9

Browse filesBrowse files
committed
Avoid sanitizer warnings
1 parent 0e5f0e0 commit d731ce9
Copy full SHA for d731ce9

File tree

3 files changed

+12
-5
lines changed
Filter options

3 files changed

+12
-5
lines changed

‎src/rum_ts_utils.c

Copy file name to clipboardExpand all lines: src/rum_ts_utils.c
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ pre_checkcondition_rum(void *checkval, QueryOperand *val, ExecPhraseData *data)
216216
j = gcv->map_item_operand[((QueryItem *) val) - gcv->first_item];
217217
/* return presence of current entry in indexed value */
218218
#if PG_VERSION_NUM >= 130000
219-
return ( *(gcv->need_recheck) ? TS_MAYBE : gcv->check[j] );
219+
return ( *(gcv->need_recheck) ? TS_MAYBE : (gcv->check[j] ? TS_YES : TS_NO) );
220220
#else
221221
return gcv->check[j];
222222
#endif
@@ -228,7 +228,7 @@ rum_tsquery_pre_consistent(PG_FUNCTION_ARGS)
228228
bool *check = (bool *) PG_GETARG_POINTER(0);
229229
TSQuery query = PG_GETARG_TSQUERY(2);
230230
Pointer *extra_data = (Pointer *) PG_GETARG_POINTER(4);
231-
bool recheck;
231+
bool recheck = false;
232232
bool res = false;
233233

234234
if (query->size > 0)

‎src/rumscan.c

Copy file name to clipboardExpand all lines: src/rumscan.c
+6-3Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -703,9 +703,12 @@ rumNewScanKey(IndexScanDesc scan)
703703
repalloc(so->entries, so->allocentries * sizeof(RumScanEntry));
704704
}
705705

706-
memcpy(so->entries + so->totalentries,
707-
key->scanEntry, sizeof(*key->scanEntry) * key->nentries);
708-
so->totalentries += key->nentries;
706+
if ( key->scanEntry != NULL )
707+
{
708+
memcpy(so->entries + so->totalentries,
709+
key->scanEntry, sizeof(*key->scanEntry) * key->nentries);
710+
so->totalentries += key->nentries;
711+
}
709712
}
710713

711714
/*

‎src/rumsort.c

Copy file name to clipboardExpand all lines: src/rumsort.c
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,11 @@
5454

5555
/* GUC variables */
5656
#ifdef TRACE_SORT
57+
#ifndef trace_sort
5758
bool trace_sort = false;
59+
#else
60+
trace_sort = false;
61+
#endif
5862
#endif
5963

6064
typedef struct

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.