Skip to content

Fix segmentation fault of SUBSTRING (#1903)#1914

Merged
leiysky merged 4 commits intopingcap:release-4.0from
ti-srebot:release-4.0-b40059d50ca7
Jul 7, 2021
Merged

Fix segmentation fault of SUBSTRING (#1903)#1914
leiysky merged 4 commits intopingcap:release-4.0from
ti-srebot:release-4.0-b40059d50ca7

Conversation

@ti-srebot
Copy link
Collaborator

@ti-srebot ti-srebot commented May 17, 2021

cherry-pick #1903 to release-4.0
You can switch your code base to this Pull Request by using git-extras:

# In tics repo:
git pr https://github.com/pingcap/tics/pull/1914

After apply modifications, you can push your change to this PR via:

git push git@github.com:ti-srebot/tics.git pr/1914:release-4.0-b40059d50ca7

What problem does this PR solve?

Issue Number: close #1184

Problem Summary:
The root cause is that SubstringUTF8 function in TiFlash doesn't correcly handle the case pos is a negative value and its absolute value is greater than length of input string.

What is changed and how it works?

Proposal: xxx

What's Changed:

Related changes

  • Need to cherry-pick to the release branch:

Check List

Tests

  • Integration test

Release note

  • Fix the problem that TiFlash will crash when executing SUBSTRING function with specific argument

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot ti-srebot added CHERRY-PICK cherry pick status/LGT1 Indicates that a PR has LGTM 1. type/bugfix This PR fixes a bug. labels May 17, 2021
@ti-srebot ti-srebot added this to the v4.0.13 milestone May 17, 2021
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

@JaySon-Huang JaySon-Huang modified the milestones: v4.0.13, v4.0.14 May 28, 2021
@leiysky
Copy link
Contributor

leiysky commented Jul 7, 2021

/merge

@ti-srebot ti-srebot added the status/can-merge Indicates a PR has been approved by a committer. label Jul 7, 2021
@ti-srebot
Copy link
Collaborator Author

/run-all-tests

@ti-srebot
Copy link
Collaborator Author

@ti-srebot merge failed.

@leiysky
Copy link
Contributor

leiysky commented Jul 7, 2021

/run-all-tests

@leiysky leiysky merged commit fc39209 into pingcap:release-4.0 Jul 7, 2021
@leiysky leiysky deleted the release-4.0-b40059d50ca7 branch July 7, 2021 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CHERRY-PICK cherry pick status/can-merge Indicates a PR has been approved by a committer. status/LGT1 Indicates that a PR has LGTM 1. type/bugfix This PR fixes a bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants