Skip to content

Conversation

practicalswift
Copy link
Contributor

Avoid designated initialization (C++20) in fuzz tests.

Context: #20197 (comment), #20936 (comment)

@fanquake fanquake added the Tests label Jan 30, 2021
@maflcko
Copy link
Member

maflcko commented Jan 30, 2021

cr ACK dee2d6f

@dhruv
Copy link
Contributor

dhruv commented Jan 30, 2021

code review ACK dee2d6f

@ajtowns
Copy link
Contributor

ajtowns commented Jan 31, 2021

utACK dee2d6f

If you wanted to preserve the constness, could do something like the designated initializers via:

#define DES_INIT_VIA_x(TYP, CODE)     (([&]() { TYP x; {CODE} return x; })())

const in_addr v4_addr = DES_INIT_VIA_x(in_addr,
        x.s_addr = fuzzed_data_provider.ConsumeIntegral<uint32_t>();
);

@maflcko maflcko merged commit 1f51433 into bitcoin:master Jan 31, 2021
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Feb 2, 2021
… fuzz tests

dee2d6f fuzz: Avoid designated initialization (C++20) in fuzz tests (practicalswift)

Pull request description:

  Avoid designated initialization (C++20) in fuzz tests.

  Context: bitcoin#20197 (comment), bitcoin#20936 (comment)

ACKs for top commit:
  MarcoFalke:
    cr ACK dee2d6f
  dhruv:
    code review ACK dee2d6f
  ajtowns:
    utACK dee2d6f

Tree-SHA512: 5940fab6e97a2b11dd3b1475d2cffa2840dc2e6ec34bd9f9df90f948709cab98fd1c513d5dd104816d33a525a6e9710b8715b02db941e35d84f92bc211f56d1d
@practicalswift practicalswift deleted the c++20-false-start branch April 10, 2021 19:44
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 17, 2022
… fuzz tests

dee2d6f fuzz: Avoid designated initialization (C++20) in fuzz tests (practicalswift)

Pull request description:

  Avoid designated initialization (C++20) in fuzz tests.

  Context: bitcoin#20197 (comment), bitcoin#20936 (comment)

ACKs for top commit:
  MarcoFalke:
    cr ACK dee2d6f
  dhruv:
    code review ACK dee2d6f
  ajtowns:
    utACK dee2d6f

Tree-SHA512: 5940fab6e97a2b11dd3b1475d2cffa2840dc2e6ec34bd9f9df90f948709cab98fd1c513d5dd104816d33a525a6e9710b8715b02db941e35d84f92bc211f56d1d
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Aug 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants