Skip to content

Commit

Permalink
Revert "Poison hashtable buffers."
Browse files Browse the repository at this point in the history
This reverts commit c866486.
  • Loading branch information
bholley authored and Manishearth committed Oct 23, 2017
1 parent b118ba7 commit 3cffc8c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions components/hashglobe/src/table.rs
Expand Up @@ -777,16 +777,13 @@ impl<K, V> RawTable<K, V> {


// FORK NOTE: Uses alloc shim instead of Heap.alloc
let buffer: *mut u8 = alloc(size, alignment);
let buffer = alloc(size, alignment);

if buffer.is_null() {

return Err(FailedAllocationError { reason: "out of memory when allocating RawTable" });
}

// FORK NOTE: poison the entire buffer rather than leaving it uninitialized.
ptr::write_bytes(buffer, 0xe7, size);

let hashes = buffer.offset(hash_offset as isize) as *mut HashUint;

Ok(RawTable {
Expand Down

0 comments on commit 3cffc8c

Please sign in to comment.