Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix decimal to real asan stack-use-after-scope error #8780

Merged
merged 3 commits into from
Feb 22, 2024

Conversation

yibin87
Copy link
Contributor

@yibin87 yibin87 commented Feb 22, 2024

What problem does this PR solve?

Issue Number: ref #8285

Problem Summary:
https://github.com/pingcap/tiflash/blob/82a13c4da1a93ef872e553ff31ab140916c79a78/dbms/src/Functions/FunctionsTiDBConversion.h#L777C1-L778C44
The local variable field is a reference to temporary object col_from[i], and its scope is limited to that statement. It's suspicious here.
Asan error:
#8285 (comment)

What is changed and how it works?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

None

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 22, 2024
Signed-off-by: yibin <[email protected]>
@yibin87
Copy link
Contributor Author

yibin87 commented Feb 22, 2024

/run-all-tests

Copy link
Contributor

@xzhangxian1008 xzhangxian1008 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Feb 22, 2024
Copy link
Contributor

@windtalker windtalker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

ti-chi-bot bot commented Feb 22, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: windtalker, xzhangxian1008

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added lgtm approved and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Feb 22, 2024
Copy link
Contributor

ti-chi-bot bot commented Feb 22, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-02-22 03:42:20.050670378 +0000 UTC m=+501428.798293483: ☑️ agreed by xzhangxian1008.
  • 2024-02-22 04:08:01.555048229 +0000 UTC m=+502970.302671340: ☑️ agreed by windtalker.

@yibin87
Copy link
Contributor Author

yibin87 commented Feb 22, 2024

/run-all-tests

@yibin87
Copy link
Contributor Author

yibin87 commented Feb 22, 2024

/run-unit-test

@ti-chi-bot ti-chi-bot bot merged commit cab8352 into pingcap:master Feb 22, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants