Skip to content

Correct use of StringRef and ArrayRef#53167

Merged
copybara-service[bot] merged 1 commit intotensorflow:masterfrom
elfringham:core-ir-test-fix
Dec 22, 2021
Merged

Correct use of StringRef and ArrayRef#53167
copybara-service[bot] merged 1 commit intotensorflow:masterfrom
elfringham:core-ir-test-fix

Conversation

@elfringham
Copy link
Copy Markdown
Contributor

Current code takes a reference to transient objects which go out of scope and get overwritten. This renders the references taken invalid and leads to incorrect operation and possible SIGSEGV.
The objects referred to by StringRef and ArrayRef need to have their own independent lifetime.
Fixes #53166

@elfringham elfringham requested a review from jpienaar as a code owner November 23, 2021 12:20
@google-ml-butler google-ml-butler Bot added the size:S CL Change Size: Small label Nov 23, 2021
@google-cla google-cla Bot added the cla: yes label Nov 23, 2021
@google-ml-butler google-ml-butler Bot added the awaiting review Pull request awaiting review label Nov 23, 2021
@gbaned gbaned added the prtype:bugfix PR to fix a bug label Dec 3, 2021
@gbaned gbaned requested a review from cheshire December 3, 2021 18:44
@cheshire cheshire removed their request for review December 3, 2021 22:26
Comment thread tensorflow/core/ir/ops.cc
@tensorflowbutler tensorflowbutler removed the awaiting review Pull request awaiting review label Dec 19, 2021
@elfringham
Copy link
Copy Markdown
Contributor Author

Build of master was broken when the checks were run. The failure comes from that reason and is not due to this commit.

@google-ml-butler google-ml-butler Bot added kokoro:force-run Tests on submitted change ready to pull PR ready for merge process labels Dec 21, 2021
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Dec 21, 2021
@google-ml-butler google-ml-butler Bot added the kokoro:force-run Tests on submitted change label Dec 22, 2021
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Dec 22, 2021
@google-ml-butler google-ml-butler Bot added the kokoro:force-run Tests on submitted change label Dec 22, 2021
@kokoro-team kokoro-team removed kokoro:force-run Tests on submitted change labels Dec 22, 2021
@copybara-service copybara-service Bot merged commit abbf390 into tensorflow:master Dec 22, 2021
@google-ml-butler google-ml-butler Bot removed the ready to pull PR ready for merge process label Dec 22, 2021
@elfringham elfringham deleted the core-ir-test-fix branch January 4, 2022 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes prtype:bugfix PR to fix a bug size:S CL Change Size: Small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unit tests //tensorflow/core/ir/... fail or crash depending on optimization level

6 participants