wallet: Set DatabaseStatus::SUCCESS in MakeSQLiteDatabase #20324

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:2011-walletSqliteSuccess changing 1 files +1 −0
  1. MarcoFalke commented at 7:38 pm on November 5, 2020: member

    This is a refactor to set the status to SUCCESS (like it is done in MakeBerkeleyDatabase, too). It also happens to fix a false positive valgrind warning (tested with bionic-gcc and focal-clang):

     0 node1 stderr ==28149== Conditional jump or move depends on uninitialised value(s)
     1==28149==    at 0x464471: LoadWallets(interfaces::Chain&) (load.cpp:105)
     2==28149==    by 0x44BFBA: interfaces::(anonymous namespace)::WalletClientImpl::load() (wallet.cpp:510)
     3==28149==    by 0x1640F9: AppInitMain(util::Ref const&, NodeContext&, interfaces::BlockAndHeaderTipInfo*) (init.cpp:1815)
     4==28149==    by 0x144F3F: AppInit (bitcoind.cpp:142)
     5==28149==    by 0x144F3F: main (bitcoind.cpp:172)
     6==28149== 
     7{
     8   <insert_a_suppression_name_here>
     9   Memcheck:Cond
    10   fun:_Z11LoadWalletsRN10interfaces5ChainE
    11   fun:_ZN10interfaces12_GLOBAL__N_116WalletClientImpl4loadEv
    12   fun:_Z11AppInitMainRKN4util3RefER11NodeContextPN10interfaces21BlockAndHeaderTipInfoE
    13   fun:AppInit
    14   fun:main
    15} 
    16
    17TEST                                             | STATUS    | DURATION
    18
    19wallet_hd.py --descriptors                       |  Failed  | 69 s
    
  2. MarcoFalke added the label Refactoring on Nov 5, 2020
  3. MarcoFalke added the label Wallet on Nov 5, 2020
  4. MarcoFalke renamed this:
    wallet: Set DatabaseStatus::SUCCESSS in MakeSQLiteDatabase
    wallet: Set DatabaseStatus::SUCCESS in MakeSQLiteDatabase
    on Nov 5, 2020
  5. wallet: Set DatabaseStatus::SUCCESS in MakeSQLiteDatabase faf5fa7413
  6. MarcoFalke force-pushed on Nov 5, 2020
  7. achow101 commented at 8:02 pm on November 5, 2020: member
    ACK faf5fa74136b0117f02c5aa525bfff86654786ea
  8. practicalswift commented at 8:17 pm on November 5, 2020: contributor
    Concept ACK @MarcoFalke I’m trying to correlate the line numbers in the valgrind output with the code: do you know which revision you were running? valgrind false positives are quite rare so it would be interesting to analyze this case :)
  9. mjdietzx approved
  10. mjdietzx commented at 8:20 pm on November 5, 2020: contributor
    ack faf5fa74136b0117f02c5aa525bfff86654786ea
  11. MarcoFalke commented at 8:25 pm on November 5, 2020: member

    @practicalswift It is normal master, line 105 is:

    0            if (!database && status == DatabaseStatus::FAILED_NOT_FOUND) {
    

    status should only be read when the db doesn’t exists, in which case status is also set.

  12. MarcoFalke merged this on Nov 6, 2020
  13. MarcoFalke closed this on Nov 6, 2020

  14. MarcoFalke deleted the branch on Nov 6, 2020
  15. sidhujag referenced this in commit 66df66d992 on Nov 6, 2020
  16. DrahtBot locked this on Feb 15, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-17 06:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me