liuis / leveldb

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

Linking with the LLVM C++ Standard Library corrupts any value stored in the database. #54

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
=========================

Compiling an application with the LLVM C++ Standard Library 
(http://libcxx.llvm.org/) with Xcode corrupts any values written to the 
database file.  The keys are uncorrupted.  The values appear to be fine until 
the database is closed and reopened.  Using the GNU C++ Standard Library works 
fine.

What is the expected output? 
===================

Storing this hex value: (Put)
<62706c69 73743030 d4010203 04050609 0a582476 65727369 6f6e5824 6f626a65 
63747359 24617263 68697665 72542474 6f701200 0186a0a2 07085524 6e756c6c 
5b546573 74696e67 20313233 5f100f4e 534b6579 65644172 63686976 6572d10b 
0c566f62 6a656374 80010811 1a232d32 373a404c 5e616800 00000000 00010100 
00000000 00000d00 00000000 00000000 00000000 00006a>

Close and reopen database.

Returns this hex value: (Get)
<62706c69 73743030 d4010203 04050609 0a582476 65727369 6f6e5824 6f626a65 
63747359 24617263 68697665 72542474 6f701200 0186a0a2 07085524 6e756c6c 
5b546573 74696e67 20313233 5f100f4e 534b6579 65644172 63686976 6572d10b 
0c566f62 6a656374 80010811 1a232d32 373a404c 5e616800 00000000 00010100 
00000000 00000d00 00000000 00000000 00000000 00006a>

What do you see instead?
================

Storing this hex value: (Put)
<62706c69 73743030 d4010203 04050609 0a582476 65727369 6f6e5824 6f626a65 
63747359 24617263 68697665 72542474 6f701200 0186a0a2 07085524 6e756c6c 
5b546573 74696e67 20313233 5f100f4e 534b6579 65644172 63686976 6572d10b 
0c566f62 6a656374 80010811 1a232d32 373a404c 5e616800 00000000 00010100 
00000000 00000d00 00000000 00000000 00000000 00006a>

Close and reopen database.

Returns this hex value: (Get)
<30302030 31383661 30613220 30373038 35353234 20366537 35366336 63203562 
35343635 37332037 34363936 65363720 32303331 33323333 20356631 30306634 
00000000 00000080 00000000 00000080 a5003220 36333638 36393736 20363537 
32643130 62203063 35363666 36322036 61363536 33373420 38303031 30383131 
20316132 33326433 32203337 33613430 34632035 653631>

What version of the product are you using? On what operating system?
============================================

Git repository on November 7th, 2011.  OS X Lion, Xcode 4.2 Build 4D199, 64-bit 
Intel

Original issue reported on code.google.com by eric.sum...@gmail.com on 8 Nov 2011 at 6:00

GoogleCodeExporter commented 9 years ago
Seems to be working with both standard libraries now.  I'm not sure what 
happened.  I'll update if I have more information.

Original comment by eric.sum...@gmail.com on 8 Nov 2011 at 6:52

GoogleCodeExporter commented 9 years ago
As always, re-open or file a new bug if you see this again.

Original comment by dgrogan@chromium.org on 4 May 2012 at 9:59