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

fix: reading dirty memory from Util::HasOnlyZeros in G2Element deserialization #77

Merged
merged 1 commit into from
May 26, 2023

Conversation

knst
Copy link

@knst knst commented May 16, 2023

It fixes this bug while running with valgrind:

==4670== Conditional jump or move depends on uninitialised value(s)
==4670==    at 0x1041396: bls::G2Element::FromBytesUnchecked(bls::Bytes, bool) (in DASH/src/test/test_dash)
==4670==    by 0x10417C6: bls::G2Element::FromBytes(bls::Bytes, bool) (in DASH/src/test/test_dash)
==4670==    by 0x43A735: CBLSWrapper<bls::G2Element, 96ul, CBLSSignature>::SetByteVector(std::vector<unsigned char, std::allocator<unsigned char> > const&, bool) (bls.h:113)
==4670==    by 0x43A971: void CBLSWrapper<bls::G2Element, 96ul, CBLSSignature>::Unserialize<CDataStream>(CDataStream&, bool, bool) (bls.h:190)
==4670==    by 0x43111E: Unserialize<CDataStream> (bls.h:210)
==4670==    by 0x43111E: Unserialize<CDataStream, CBLSSignature&> (serialize.h:906)
==4670==    by 0x43111E: operator>><CBLSSignature&> (streams.h:465)
==4670==    by 0x43111E: bls_tests::FuncSerialize(bool) (bls_tests.cpp:50)
==4670==    by 0x431C5F: test_method (bls_tests.cpp:418)
==4670==    by 0x431C5F: bls_tests::bls_serialize_tests_invoker() (bls_tests.cpp:416)
==4670==    by 0x115D4E1: boost::detail::function::function_obj_invoker0<boost::detail::forward, int>::invoke(boost::detail::function::function_buffer&) (in DASH/src/test/test_dash)
==4670==    by 0x115BB8C: boost::execution_monitor::catch_signals(boost::function<int ()> const&) (in DASH/src/test/test_dash)
==4670==    by 0x115BC14: boost::execution_monitor::execute(boost::function<int ()> const&) (in DASH/src/test/test_dash)
==4670==    by 0x115BCF4: boost::execution_monitor::vexecute(boost::function<void ()> const&) (in DASH/src/test/test_dash)
==4670==    by 0x1122824: boost::unit_test::unit_test_monitor_t::execute_and_translate(boost::function<void ()> const&, unsigned long) (in DASH/src/test/test_dash)
==4670==    by 0x10FC17F: boost::unit_test::framework::state::execute_test_tree(unsigned long, unsigned long, boost::unit_test::framework::state::random_generator_helper const*) [clone .isra.0] (in DASH/src/test/test_dash)
==4670== 

@knst knst requested a review from ogabrielides May 16, 2023 10:02
Copy link
Collaborator

@ogabrielides ogabrielides left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but why some CI fail?

@knst
Copy link
Author

knst commented May 16, 2023

but why some CI fail?

@ogabrielides , seems as CI is broken for awhile, previous PRs fails same:

I haven't check why yet, but it seems as all of them is Go's related.

@knst
Copy link
Author

knst commented May 23, 2023

@ogabrielides here's PR from Konstantin to fix CI failure. #82
Please, help to merge this one.

Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK (preferably after #82 + rebase)

@UdjinM6 UdjinM6 merged commit 851c2c8 into dashpay:develop May 26, 2023
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

Successfully merging this pull request may close these issues.

3 participants