Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[tf.data] Fixing internal test failures.
PiperOrigin-RevId: 253113807
- Loading branch information
1 parent
c026183
commit 0b48315
Showing
4 changed files
with
31 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0b48315
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jsimsa Thanks for your fix! It looks like the internal checks are very helpful for finding the potential issues. Do you know what's the issue here?
0b48315
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My best guess is that
static_cast<const strings::AlphaNum&>(args).Piece()...
goes out of scope by the timeabsl::StrJoin
is called. That aside, there is no need to create a helper for this as you can achieve the same behavior by passing the values directly intoabsl::StrJoin
as astd::tuple
.0b48315
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be clear, one of the internal checks (AddressSanitizer) was failing with "stack-use-after-scope" which indicates that an object allocated on stack is being used after it went out of scope.
0b48315
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jsimsa Thanks for the information! Yes, the helper func is not needed. I will try if I can reproduce the issue on my laptop.
0b48315
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error can be reproduced when using
bazel test //tensorflow/core/kernels/data:name_utils_test --copt=-fsanitize=address --linkopt=-fsanitize=address --copt=-fno-omit-frame-pointer --copt=-O1
. Will addAddressSanitizer
check in the future when I run the tests on my laptop. Thanks for your help, @jsimsa!