Impala Public Jenkins has submitted this change and it was merged. ( 
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
Reviewed-on: http://gerrit.cloudera.org:8080/24341
Reviewed-by: Impala Public Jenkins <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
---
M be/src/service/query-profile-parsing-tools.cc
M be/src/service/query-profile-redaction.cc
2 files changed, 17 insertions(+), 17 deletions(-)

Approvals:
  Impala Public Jenkins: Looks good to me, approved; Verified

--
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: merged
Gerrit-Change-Id: I9eb1e73e5498761d57e593ef06da2711bfaec19d
Gerrit-Change-Number: 24341
Gerrit-PatchSet: 4
Gerrit-Owner: Yida Wu <[email protected]>
Gerrit-Reviewer: Abhishek Rawat <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Jason Fehr <[email protected]>
Gerrit-Reviewer: Yida Wu <[email protected]>

Reply via email to