Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uninitialized variable (only affects test_digibyte) #57

Open
jnschalk opened this issue Jul 20, 2021 · 3 comments
Open

Uninitialized variable (only affects test_digibyte) #57

jnschalk opened this issue Jul 20, 2021 · 3 comments

Comments

@jnschalk
Copy link

compiler: gcc (Gentoo 11.1.0-r1 p2) 11.1.0
valgrind-3.17.0
running the develop branch (hash 02bfbf7)

Ran valgrind --track-origins=yes --read-var-info=yes ./test_digibyte

and it reported:

==14528==    at 0x4724A6: CBlockIndex::GetAncestor(int) const (chain.cpp:98)
==14528==    by 0x5B4322: CChainState::ConnectBlock(CBlock const&, CValidationState&, CBlockIndex*, CCoinsViewCache&, CChainParams const&, bool) (validation.cpp:2052)
...
==14528==  Uninitialised value was created by a heap allocation
==14528==    at 0x483FF5F: operator new(unsigned long) (vg_replace_malloc.c:417)
==14528==    by 0x60F313: CreateChainParams(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (chainparams.cpp:585)
==14528==    by 0x60F3A7: SelectParams(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (chainparams.cpp:592)

looking at the CRegTestParams::CRegTestParams() it looks like it never sets consensus.BIP34Height = 4394880;

@ChillingSilence
Copy link

Pleasure chatting to you today about this. thanks again for your time and input as always!

@jnschalk
Copy link
Author

refactor the CChainParams::consensus initialization duplication?

@ChillingSilence
Copy link

I think that's one of the things that @barrystyle has been doing at DigiByte-Project/digibyte-refactor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants