aboutsummaryrefslogtreecommitdiffstats
path: root/build/scripts/fix_py2_protobuf.py
diff options
context:
space:
mode:
authornechda <nechda@yandex-team.com>2025-02-02 20:52:35 +0300
committernechda <nechda@yandex-team.com>2025-02-02 21:05:55 +0300
commit4078b4f040b2db49b3b690eea4d0352e73caffe8 (patch)
tree37df1b93c50e217309e785a8620366524833ae06 /build/scripts/fix_py2_protobuf.py
parentb376b6fe5994a31f79310fb1e2b28e47dc63db5b (diff)
downloadydb-4078b4f040b2db49b3b690eea4d0352e73caffe8.tar.gz
[ASAN] Enable detect_odr_violation=2
The ASAN flag for detecting ODR violations has been set to its **++default++** value (2). commit_hash:7475c1eb748fa0704d3db551189591c87ce5357d
Diffstat (limited to 'build/scripts/fix_py2_protobuf.py')
-rw-r--r--build/scripts/fix_py2_protobuf.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/build/scripts/fix_py2_protobuf.py b/build/scripts/fix_py2_protobuf.py
index b2e9ed028b..1f5f86c26f 100644
--- a/build/scripts/fix_py2_protobuf.py
+++ b/build/scripts/fix_py2_protobuf.py
@@ -22,6 +22,17 @@ def gen_renames_1(d):
def gen_renames_2(p, d):
for s in gen_renames_1(d):
+ """
+ Since clang-17, the option -fsanitize-address-globals-dead-stripping
+ has been enabled by default. Due to this, we have broken optimization
+ that merges calls to the `asan.module_ctor` function, as we are renaming
+ symbols with a prefix of 'py2_'. When this flag is enabled, and
+ the functions are not merged, false-positive ODR (One Definition Rule)
+ violations occur on objects such as `typeinfo std::exception`, because
+ the runtime is trying to handle global objects that have already been handled.
+ """
+ if 'asan_globals' in s:
+ continue
yield s + ' ' + p + s