jlyu / leveldb

Automatically exported from code.google.com/p/leveldb
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

assertion failed #166

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
*What steps will reproduce the problem?
1. Create a leveldb database with this leveldb implementation (in my case, it 
was with the bitcoind client)
2. Open the database with the java version of leveldb 
(https://github.com/dain/leveldb)
3. Open the database with the C++ version of leveldb

*What is the expected output? What do you see instead?
The c++ leveldb will crash with an assert failure for table/block.cc, at line 
19. IMHO, the code should be:
  assert(size_ >= sizeof(uint32_t));

and table/block.cc, at line 256 should be
  if (size_ < sizeof(uint32_t)) {

*What version of the product are you using? On what operating system?
1.6.0 on Ubuntu Linux kernel 3.5.0-28-generic, x86_64

I changed the code and tested a bit and everything seems fine. Please let me 
know how this goes, so I can propagate the changes to the leveldb version used 
by the bitcoind client.

Thanks!

Original issue reported on code.google.com by pmarc...@gmail.com on 11 May 2013 at 6:15

GoogleCodeExporter commented 9 years ago

Original comment by dgrogan@chromium.org on 15 May 2013 at 12:11