-
Notifications
You must be signed in to change notification settings - Fork 21k
Closed
OffchainLabs/go-ethereum
#273Labels
Description
System information
Commit hash : c8a2202 (current master)
Expected behaviour
pebbleIterator
release should always succeed and can be called multiple times without causing error.
go-ethereum/ethdb/pebble/pebble.go
Lines 659 to 661 in 460cc16
// Release releases associated resources. Release should always succeed and can | |
// be called multiple times without causing error. | |
func (iter *pebbleIterator) Release() { iter.iter.Close() } |
Actual behaviour
Calling pebbleIterator.Release
more then once will result in calling github.com/cockroachdb/pebble.Iterator.Close
more then once, what is an invalid operation, as "it is not valid to call any method, including Close, after the iterator has been closed".
Second call to pebble.Iterator.Close
will result in access to memory that was returned to sync.Pool
and may have already been acquired by another iterator in another goroutine.