Skip to content

Conversation

ryanofsky
Copy link
Collaborator

CTransaction default constructor was removed in bitcoin/bitcoin@faac315 which exposed two places where libmultiprocess was inadvertently assuming default constructors were defined.

In both places, it would never actually call the default constructor at runtime, just rely on it being present during compile time code generation.

In the first case, compiler would fail while trying to figure out the type of std::invoke_result_t<EmplaceFn> where EmplaceFn called make_shared<CTransaction>(). This was fixed by just the moving expression into an unexpanded template method.

In the second case code was calling Optional::emplace() to default-initialize CTransaction& output-arguments. It was fixed by moving into a constexpr-if that would be known to be false for output arguments at compile time.

CTransaction default constructor was removed in
faac31521bb7ecbf999541cf918d3750ff589de4
bitcoin/bitcoin#20588 which exposed two places
where libmultiprocess was inadvertently assuming default constructors
were defined.

In both places, it would never actually call the default constructor
at runtime, just rely on it being present during compile time code
generation.

In the first case, compiler would fail while trying to figure out the type of
`std::invoke_result_t<EmplaceFn>` where EmplaceFn called
`make_shared<CTransaction>()`. This was fixed by just the moving expression
into an unexpanded template method.

In the second case code was calling Optional<CTransaction>::emplace() to
default-initialize CTransaction& output-arguments. It was fixed by
moving into a constexpr-if that would be known to be false for output
arguments at compile time.
@ryanofsky ryanofsky merged commit 1b4012c into bitcoin-core:master Dec 18, 2020
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Dec 18, 2020
Fix "Disable GCC suggest-override warnings for proxy clients" bitcoin-core/libmultiprocess#40 is needed to prevent cirrus GCC failure https://cirrus-ci.com/task/6000489311502336?command=ci#L4294

This also includes other recent changes

bitcoin-core/libmultiprocess#35 Fix README.md markdown
bitcoin-core/libmultiprocess#37 Add "make check" target to build and run tests
bitcoin-core/libmultiprocess#38 Add "extends" inherited method support
bitcoin-core/libmultiprocess#41 Avoid depending on argument default constructors
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Jan 28, 2021
Fix "Disable GCC suggest-override warnings for proxy clients" bitcoin-core/libmultiprocess#40 is needed to prevent cirrus GCC failure https://cirrus-ci.com/task/6000489311502336?command=ci#L4294

This also includes other recent changes

bitcoin-core/libmultiprocess#35 Fix README.md markdown
bitcoin-core/libmultiprocess#37 Add "make check" target to build and run tests
bitcoin-core/libmultiprocess#38 Add "extends" inherited method support
bitcoin-core/libmultiprocess#41 Avoid depending on argument default constructors
bitcoin-core/libmultiprocess#42 Support attaching custom cleanup functions to proxy client and server classes
bitcoin-core/libmultiprocess#43 Drop hardcoded #include lines in generated files
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Jan 28, 2021
Fix "Disable GCC suggest-override warnings for proxy clients" bitcoin-core/libmultiprocess#40 is needed to prevent cirrus GCC failure https://cirrus-ci.com/task/6000489311502336?command=ci#L4294

This also includes other recent changes

bitcoin-core/libmultiprocess#35 Fix README.md markdown
bitcoin-core/libmultiprocess#37 Add "make check" target to build and run tests
bitcoin-core/libmultiprocess#38 Add "extends" inherited method support
bitcoin-core/libmultiprocess#41 Avoid depending on argument default constructors
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Mar 4, 2021
Fix "Disable GCC suggest-override warnings for proxy clients" bitcoin-core/libmultiprocess#40 is needed to prevent cirrus GCC failure https://cirrus-ci.com/task/6000489311502336?command=ci#L4294

This also includes other recent changes

bitcoin-core/libmultiprocess#35 Fix README.md markdown
bitcoin-core/libmultiprocess#37 Add "make check" target to build and run tests
bitcoin-core/libmultiprocess#38 Add "extends" inherited method support
bitcoin-core/libmultiprocess#41 Avoid depending on argument default constructors
bitcoin-core/libmultiprocess#42 Support attaching custom cleanup functions to proxy client and server classes
bitcoin-core/libmultiprocess#43 Drop hardcoded #include lines in generated files
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Mar 4, 2021
Fix "Disable GCC suggest-override warnings for proxy clients" bitcoin-core/libmultiprocess#40 is needed to prevent cirrus GCC failure https://cirrus-ci.com/task/6000489311502336?command=ci#L4294

This also includes other recent changes

bitcoin-core/libmultiprocess#35 Fix README.md markdown
bitcoin-core/libmultiprocess#37 Add "make check" target to build and run tests
bitcoin-core/libmultiprocess#38 Add "extends" inherited method support
bitcoin-core/libmultiprocess#41 Avoid depending on argument default constructors
bitcoin-core/libmultiprocess#42 Support attaching custom cleanup functions to proxy client and server classes
bitcoin-core/libmultiprocess#43 Drop hardcoded #include lines in generated files
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Mar 4, 2021
Update libmultiprocess library

Fix "Disable GCC suggest-override warnings for proxy clients" bitcoin-core/libmultiprocess#40 is needed to prevent cirrus GCC failure https://cirrus-ci.com/task/6000489311502336?command=ci#L4294

This also includes other recent changes

bitcoin-core/libmultiprocess#35 Fix README.md markdown
bitcoin-core/libmultiprocess#37 Add "make check" target to build and run tests
bitcoin-core/libmultiprocess#38 Add "extends" inherited method support
bitcoin-core/libmultiprocess#41 Avoid depending on argument default constructors
bitcoin-core/libmultiprocess#42 Support attaching custom cleanup functions to proxy client and server classes
bitcoin-core/libmultiprocess#43 Drop hardcoded #include lines in generated files
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Mar 17, 2021
Update libmultiprocess library

Fix "Disable GCC suggest-override warnings for proxy clients" bitcoin-core/libmultiprocess#40 is needed to prevent cirrus GCC failure https://cirrus-ci.com/task/6000489311502336?command=ci#L4294

This also includes other recent changes

bitcoin-core/libmultiprocess#35 Fix README.md markdown
bitcoin-core/libmultiprocess#37 Add "make check" target to build and run tests
bitcoin-core/libmultiprocess#38 Add "extends" inherited method support
bitcoin-core/libmultiprocess#41 Avoid depending on argument default constructors
bitcoin-core/libmultiprocess#42 Support attaching custom cleanup functions to proxy client and server classes
bitcoin-core/libmultiprocess#43 Drop hardcoded #include lines in generated files
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Mar 17, 2021
Fix "Disable GCC suggest-override warnings for proxy clients" bitcoin-core/libmultiprocess#40 is needed to prevent cirrus GCC failure https://cirrus-ci.com/task/6000489311502336?command=ci#L4294

This also includes other recent changes

bitcoin-core/libmultiprocess#35 Fix README.md markdown
bitcoin-core/libmultiprocess#37 Add "make check" target to build and run tests
bitcoin-core/libmultiprocess#38 Add "extends" inherited method support
bitcoin-core/libmultiprocess#41 Avoid depending on argument default constructors
bitcoin-core/libmultiprocess#42 Support attaching custom cleanup functions to proxy client and server classes
bitcoin-core/libmultiprocess#43 Drop hardcoded #include lines in generated files
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Mar 17, 2021
Fix "Disable GCC suggest-override warnings for proxy clients" bitcoin-core/libmultiprocess#40 is needed to prevent cirrus GCC failure https://cirrus-ci.com/task/6000489311502336?command=ci#L4294

This also includes other recent changes

bitcoin-core/libmultiprocess#35 Fix README.md markdown
bitcoin-core/libmultiprocess#37 Add "make check" target to build and run tests
bitcoin-core/libmultiprocess#38 Add "extends" inherited method support
bitcoin-core/libmultiprocess#41 Avoid depending on argument default constructors
bitcoin-core/libmultiprocess#42 Support attaching custom cleanup functions to proxy client and server classes
bitcoin-core/libmultiprocess#43 Drop hardcoded #include lines in generated files
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Mar 30, 2021
Fix "Disable GCC suggest-override warnings for proxy clients" bitcoin-core/libmultiprocess#40 is needed to prevent cirrus GCC failure https://cirrus-ci.com/task/6000489311502336?command=ci#L4294

This also includes other recent changes

bitcoin-core/libmultiprocess#35 Fix README.md markdown
bitcoin-core/libmultiprocess#37 Add "make check" target to build and run tests
bitcoin-core/libmultiprocess#38 Add "extends" inherited method support
bitcoin-core/libmultiprocess#41 Avoid depending on argument default constructors
bitcoin-core/libmultiprocess#42 Support attaching custom cleanup functions to proxy client and server classes
bitcoin-core/libmultiprocess#43 Drop hardcoded #include lines in generated files
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Mar 30, 2021
Fix "Disable GCC suggest-override warnings for proxy clients" bitcoin-core/libmultiprocess#40 is needed to prevent cirrus GCC failure https://cirrus-ci.com/task/6000489311502336?command=ci#L4294

This also includes other recent changes

bitcoin-core/libmultiprocess#35 Fix README.md markdown
bitcoin-core/libmultiprocess#37 Add "make check" target to build and run tests
bitcoin-core/libmultiprocess#38 Add "extends" inherited method support
bitcoin-core/libmultiprocess#41 Avoid depending on argument default constructors
bitcoin-core/libmultiprocess#42 Support attaching custom cleanup functions to proxy client and server classes
bitcoin-core/libmultiprocess#43 Drop hardcoded #include lines in generated files
ariard pushed a commit to ariard/bitcoin that referenced this pull request Apr 6, 2021
Fix "Disable GCC suggest-override warnings for proxy clients" bitcoin-core/libmultiprocess#40 is needed to prevent cirrus GCC failure https://cirrus-ci.com/task/6000489311502336?command=ci#L4294

This also includes other recent changes

bitcoin-core/libmultiprocess#35 Fix README.md markdown
bitcoin-core/libmultiprocess#37 Add "make check" target to build and run tests
bitcoin-core/libmultiprocess#38 Add "extends" inherited method support
bitcoin-core/libmultiprocess#41 Avoid depending on argument default constructors
bitcoin-core/libmultiprocess#42 Support attaching custom cleanup functions to proxy client and server classes
bitcoin-core/libmultiprocess#43 Drop hardcoded #include lines in generated files
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Apr 23, 2021
Fix "Disable GCC suggest-override warnings for proxy clients" bitcoin-core/libmultiprocess#40 is needed to prevent cirrus GCC failure https://cirrus-ci.com/task/6000489311502336?command=ci#L4294

This also includes other recent changes

bitcoin-core/libmultiprocess#35 Fix README.md markdown
bitcoin-core/libmultiprocess#37 Add "make check" target to build and run tests
bitcoin-core/libmultiprocess#38 Add "extends" inherited method support
bitcoin-core/libmultiprocess#41 Avoid depending on argument default constructors
bitcoin-core/libmultiprocess#42 Support attaching custom cleanup functions to proxy client and server classes
bitcoin-core/libmultiprocess#43 Drop hardcoded #include lines in generated files
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Apr 23, 2021
Fix "Disable GCC suggest-override warnings for proxy clients" bitcoin-core/libmultiprocess#40 is needed to prevent cirrus GCC failure https://cirrus-ci.com/task/6000489311502336?command=ci#L4294

This also includes other recent changes

bitcoin-core/libmultiprocess#35 Fix README.md markdown
bitcoin-core/libmultiprocess#37 Add "make check" target to build and run tests
bitcoin-core/libmultiprocess#38 Add "extends" inherited method support
bitcoin-core/libmultiprocess#41 Avoid depending on argument default constructors
bitcoin-core/libmultiprocess#42 Support attaching custom cleanup functions to proxy client and server classes
bitcoin-core/libmultiprocess#43 Drop hardcoded #include lines in generated files
@bitcoin-core bitcoin-core locked and limited conversation to collaborators Jun 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant