-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix crash in HashTable::groupProbe (#1302)
Summary: The actual fix is to replace ``` lookup.normalizedKeys.resize(numRows); ``` with ``` lookup.normalizedKeys.resize(lookup.rows.back() + 1); ``` Since this logic is duplicated in groupProbe and joinProbe, this PR extracts it into a helper function. Added a test. Before the fix the test would crash in ASAN mode: ``` ==1665828==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x631001514800 at pc 0x7fb451ebad8f bp 0x7ffe2d8b1130 sp 0x7ffe2d8b1128 WRITE of size 8 at 0x631001514800 thread T0 SCARINESS: 42 (8-byte-write-heap-buffer-overflow) #0 0x7fb451ebad8e in facebook::velox::exec::HashTable<false>::groupProbe(facebook::velox::exec::HashLookup&) velox/exec/HashTable.cpp:373 #1 0x8bcb57 in HashTableTest::insertGroups(facebook::velox::RowVector const&, facebook::velox::SelectivityVector const&, facebook::velox::exec::HashLookup&, facebook::velox::exec::HashTable<false>&) velox/exec/tests/HashTableTest.cpp:186 ``` Pull Request resolved: #1302 Reviewed By: kgpai Differential Revision: D35205256 Pulled By: mbasmanova fbshipit-source-id: b3719df55513192f64b01997d293807310ebad51
- Loading branch information
1 parent
62bb53d
commit 4c8c2bf
Showing
2 changed files
with
58 additions
and
30 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