Yida Wu has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/24341


Change subject: IMPALA-15030: Fix query-profile-redaction-test failed in UBSAN 
test
......................................................................

IMPALA-15030: Fix query-profile-redaction-test failed in UBSAN test

In recent UBSAN builds, we observed test failures crashing with a
SIGSEGV for query-profile-redaction-test. We only see this crash
happen when evaluating ANALYZED_RE, likely because it is the regex
with the most deep recursion.

UBSAN itself does not directly cause the crash, but it may add
extra instrumentation that increases stack usage for each function
call. The std::regex relied heavily on deep recursive parsing, which
likely resulted in a stack overflow under UBSAN builds.

This patch uses RE2 for resolving this issue. Unlike std::regex
implementation, the RE2 avoids recursive backtracking during regex
evaluation, so more predictable stack and memory usage. To minimize
risk and scope, this patch only replaces ANALYZED_RE with RE2 to
pass the UBSAN build and leaves the remaining regexes unchanged.

Tests:
Passed UBSAN tests.

Change-Id: I9eb1e73e5498761d57e593ef06da2711bfaec19d
---
M be/src/service/query-profile-parsing-tools.cc
M be/src/service/query-profile-redaction.cc
2 files changed, 18 insertions(+), 18 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/41/24341/1
--
To view, visit http://gerrit.cloudera.org:8080/24341
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9eb1e73e5498761d57e593ef06da2711bfaec19d
Gerrit-Change-Number: 24341
Gerrit-PatchSet: 1
Gerrit-Owner: Yida Wu <[email protected]>

Reply via email to