agora inbox for pgsql-hackers@postgresql.org
help / color / mirror / Atom feed[PATCH v32 01/11] Add a syntax to create Incrementally Maintainable Materialized Views
249+ messages / 2 participants
[nested] [flat]
* [PATCH v32 01/11] Add a syntax to create Incrementally Maintainable Materialized Views
@ 2019-12-20 01:05 Yugo Nagata <nagata@sraoss.co.jp>
0 siblings, 0 replies; 249+ messages in thread
From: Yugo Nagata @ 2019-12-20 01:05 UTC (permalink / raw)
Allow to create Incrementally Maintainable Materialized View (IMMV)
by using INCREMENTAL option in CREATE MATERIALIZED VIEW command
as follow:
CREATE [INCREMANTAL] MATERIALIZED VIEW xxxxx AS SELECT ....;
---
src/backend/parser/gram.y | 32 +++++++++++++++++++++-----------
src/include/nodes/primnodes.h | 1 +
src/include/parser/kwlist.h | 1 +
3 files changed, 23 insertions(+), 11 deletions(-)
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index 682748eb4b..91df005a19 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -468,6 +468,7 @@ static Node *makeRecursiveViewSelect(char *relname, List *aliases, Node *query);
%type <range> OptTempTableName
%type <into> into_clause create_as_target create_mv_target
+%type <boolean> incremental
%type <defelt> createfunc_opt_item common_func_opt_item dostmt_opt_item
%type <fun_param> func_arg func_arg_with_default table_func_column aggr_arg
@@ -732,7 +733,7 @@ static Node *makeRecursiveViewSelect(char *relname, List *aliases, Node *query);
HANDLER HAVING HEADER_P HOLD HOUR_P
IDENTITY_P IF_P ILIKE IMMEDIATE IMMUTABLE IMPLICIT_P IMPORT_P IN_P INCLUDE
- INCLUDING INCREMENT INDENT INDEX INDEXES INHERIT INHERITS INITIALLY INLINE_P
+ INCLUDING INCREMENT INCREMENTAL INDENT INDEX INDEXES INHERIT INHERITS INITIALLY INLINE_P
INNER_P INOUT INPUT_P INSENSITIVE INSERT INSTEAD INT_P INTEGER
INTERSECT INTERVAL INTO INVOKER IS ISNULL ISOLATION
@@ -4734,32 +4735,34 @@ opt_with_data:
*****************************************************************************/
CreateMatViewStmt:
- CREATE OptNoLog MATERIALIZED VIEW create_mv_target AS SelectStmt opt_with_data
+ CREATE OptNoLog incremental MATERIALIZED VIEW create_mv_target AS SelectStmt opt_with_data
{
CreateTableAsStmt *ctas = makeNode(CreateTableAsStmt);
- ctas->query = $7;
- ctas->into = $5;
+ ctas->query = $8;
+ ctas->into = $6;
ctas->objtype = OBJECT_MATVIEW;
ctas->is_select_into = false;
ctas->if_not_exists = false;
/* cram additional flags into the IntoClause */
- $5->rel->relpersistence = $2;
- $5->skipData = !($8);
+ $6->rel->relpersistence = $2;
+ $6->skipData = !($9);
+ $6->ivm = $3;
$$ = (Node *) ctas;
}
- | CREATE OptNoLog MATERIALIZED VIEW IF_P NOT EXISTS create_mv_target AS SelectStmt opt_with_data
+ | CREATE OptNoLog incremental MATERIALIZED VIEW IF_P NOT EXISTS create_mv_target AS SelectStmt opt_with_data
{
CreateTableAsStmt *ctas = makeNode(CreateTableAsStmt);
- ctas->query = $10;
- ctas->into = $8;
+ ctas->query = $11;
+ ctas->into = $9;
ctas->objtype = OBJECT_MATVIEW;
ctas->is_select_into = false;
ctas->if_not_exists = true;
/* cram additional flags into the IntoClause */
- $8->rel->relpersistence = $2;
- $8->skipData = !($11);
+ $9->rel->relpersistence = $2;
+ $9->skipData = !($12);
+ $9->ivm = $3;
$$ = (Node *) ctas;
}
;
@@ -4776,9 +4779,14 @@ create_mv_target:
$$->tableSpaceName = $5;
$$->viewQuery = NULL; /* filled at analysis time */
$$->skipData = false; /* might get changed later */
+ $$->ivm = false;
}
;
+incremental: INCREMENTAL { $$ = true; }
+ | /*EMPTY*/ { $$ = false; }
+ ;
+
OptNoLog: UNLOGGED { $$ = RELPERSISTENCE_UNLOGGED; }
| /*EMPTY*/ { $$ = RELPERSISTENCE_PERMANENT; }
;
@@ -17454,6 +17462,7 @@ unreserved_keyword:
| INCLUDE
| INCLUDING
| INCREMENT
+ | INCREMENTAL
| INDENT
| INDEX
| INDEXES
@@ -18037,6 +18046,7 @@ bare_label_keyword:
| INCLUDE
| INCLUDING
| INCREMENT
+ | INCREMENTAL
| INDENT
| INDEX
| INDEXES
diff --git a/src/include/nodes/primnodes.h b/src/include/nodes/primnodes.h
index aa727e722c..9d0ba29a2a 100644
--- a/src/include/nodes/primnodes.h
+++ b/src/include/nodes/primnodes.h
@@ -154,6 +154,7 @@ typedef struct IntoClause
/* materialized view's SELECT query */
Node *viewQuery pg_node_attr(query_jumble_ignore);
bool skipData; /* true for WITH NO DATA */
+ bool ivm; /* true for WITH IVM */
} IntoClause;
diff --git a/src/include/parser/kwlist.h b/src/include/parser/kwlist.h
index 6c959e85d5..94c4a3de1a 100644
--- a/src/include/parser/kwlist.h
+++ b/src/include/parser/kwlist.h
@@ -210,6 +210,7 @@ PG_KEYWORD("in", IN_P, RESERVED_KEYWORD, BARE_LABEL)
PG_KEYWORD("include", INCLUDE, UNRESERVED_KEYWORD, BARE_LABEL)
PG_KEYWORD("including", INCLUDING, UNRESERVED_KEYWORD, BARE_LABEL)
PG_KEYWORD("increment", INCREMENT, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("incremental", INCREMENTAL, UNRESERVED_KEYWORD, BARE_LABEL)
PG_KEYWORD("indent", INDENT, UNRESERVED_KEYWORD, BARE_LABEL)
PG_KEYWORD("index", INDEX, UNRESERVED_KEYWORD, BARE_LABEL)
PG_KEYWORD("indexes", INDEXES, UNRESERVED_KEYWORD, BARE_LABEL)
--
2.25.1
--Multipart=_Sun__31_Mar_2024_22_59_31_+0900_msknEviJj08_wgqO
Content-Type: text/x-diff;
name="v32-0002-Add-relisivm-column-to-pg_class-system-catalog.patch"
Content-Disposition: attachment;
filename="v32-0002-Add-relisivm-column-to-pg_class-system-catalog.patch"
Content-Transfer-Encoding: 7bit
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
* [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation
@ 2026-06-12 00:15 Henson Choi <assam258@gmail.com>
0 siblings, 0 replies; 249+ messages in thread
From: Henson Choi @ 2026-06-12 00:15 UTC (permalink / raw)
The meson build passes c_args verbatim to the clang command that emits
the JIT bitcode. Under -fsanitize=address the instrumentation ends up
in the bitcode and breaks the JIT: any JIT-compiled query crashes the
backend with SIGILL. The autoconf build is unaffected, as it builds
BITCODE_CFLAGS from a whitelist that never includes CFLAGS.
Filter sanitizer flags out of c_args during bitcode generation.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewer: Henson Choi <assam258@gmail.com>
---
src/backend/jit/llvm/meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 7df8453ad6f..1ebee3bdcaf 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -61,7 +61,23 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-bitcode_cflags += get_option('c_args')
+
+# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code
+# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags
+# from c_args during bitcode generation, and warn when we do, since the
+# JIT-compiled code then runs without sanitizer coverage.
+bitcode_sanitize_stripped = false
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+foreach cflag : get_option('c_args')
+ if cflag.contains('sanitize')
+ bitcode_sanitize_stripped = true
+ else
+ bitcode_cflags += cflag
+ endif
+endforeach
+if bitcode_sanitize_stripped
+ warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented')
+endif
+
bitcode_cflags += cppflags
# XXX: Worth improving on the logic to find directories here
--
2.47.3
---- v2-0002-meson-strip-sanitizer.patch ----
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 249+ messages in thread
end of thread, other threads:[~2026-06-12 00:15 UTC | newest]
Thread overview: 249+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-12-20 01:05 [PATCH v32 01/11] Add a syntax to create Incrementally Maintainable Materialized Views Yugo Nagata <nagata@sraoss.co.jp>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
2026-06-12 00:15 [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation Henson Choi <assam258@gmail.com>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox