Page MenuHomePhabricator

void (Bill Wendling)
Mind Taker

Projects

User does not belong to any projects.

User Details

User Since
Dec 3 2012, 10:22 AM (500 w, 1 d)

Sent here from the planet Zvddw, Bill's mission is to conquer the world by staying at home and occasionally (read: always) playing poker.

In his spare time, he works on LLVM-related things.

Recent Activity

Thu, Jun 30

void added a comment to D128863: Add switch to use "source_file_name" instead of Module ID for globally promoted local.

During LTO a local promoted to a global gets a unique suffix based partially on the Module's ID.

The hash is actually a hash of the full module IR, computed when we write out the bitcode before the ThinLTO link, saved in the bitcode file, then read into a table indexed by module Id.

This has a problem, because the Module ID is not the same as the original Module ID.

Can you clarify what the different module IDs you are comparing here?

Thu, Jun 30, 2:32 PM · Restricted Project, Restricted Project

Wed, Jun 29

void requested review of D128863: Add switch to use "source_file_name" instead of Module ID for globally promoted local.
Wed, Jun 29, 4:18 PM · Restricted Project, Restricted Project

May 20 2022

void added a comment to D124836: [AArch64] Add support for -fzero-call-used-regs.

got it. Yes, looks like it fixed. The test got passed during the last build: https://lab.llvm.org/buildbot/#/builders/104/builds/7812
Thank you.

May 20 2022, 2:22 PM · Restricted Project, Restricted Project, Restricted Project
void requested review of D126083: [AArch64] Use proper instruction mnemonics for FPRs.
May 20 2022, 12:01 PM · Restricted Project, Restricted Project

May 19 2022

void committed rG6e00a34cdb49: [AArch64] Add support for -fzero-call-used-regs (authored by void).
[AArch64] Add support for -fzero-call-used-regs
May 19 2022, 4:59 PM · Restricted Project, Restricted Project, Restricted Project
void closed D124836: [AArch64] Add support for -fzero-call-used-regs.
May 19 2022, 4:58 PM · Restricted Project, Restricted Project, Restricted Project
void updated the diff for D124836: [AArch64] Add support for -fzero-call-used-regs.

Last update.

May 19 2022, 4:56 PM · Restricted Project, Restricted Project, Restricted Project
void committed rG88043c1958cb: [TableGen] Add generation of argument register lists (authored by void).
[TableGen] Add generation of argument register lists
May 19 2022, 3:18 PM · Restricted Project, Restricted Project
void added inline comments to D125421: [TableGen] Add generation of argument register lists.
May 19 2022, 3:18 PM · Restricted Project, Restricted Project
void added a reverting change for rG3fa1b6557d08: [TableGen] Add generation of argument register lists: rGdb0ea51c830a: Revert "[TableGen] Add generation of argument register lists".
May 19 2022, 3:16 PM · Restricted Project, Restricted Project
void committed rGdb0ea51c830a: Revert "[TableGen] Add generation of argument register lists" (authored by void).
Revert "[TableGen] Add generation of argument register lists"
May 19 2022, 3:16 PM · Restricted Project, Restricted Project
void added a reverting change for D125421: [TableGen] Add generation of argument register lists: rGdb0ea51c830a: Revert "[TableGen] Add generation of argument register lists".
May 19 2022, 3:16 PM · Restricted Project, Restricted Project
void committed rG3fa1b6557d08: [TableGen] Add generation of argument register lists (authored by void).
[TableGen] Add generation of argument register lists
May 19 2022, 3:03 PM · Restricted Project, Restricted Project
void closed D125421: [TableGen] Add generation of argument register lists.
May 19 2022, 3:03 PM · Restricted Project, Restricted Project
void updated the diff for D125421: [TableGen] Add generation of argument register lists.

Fix up worklist loop.

May 19 2022, 2:26 PM · Restricted Project, Restricted Project
void updated the diff for D125421: [TableGen] Add generation of argument register lists.

Remove "goto" for a worklist.

May 19 2022, 1:46 PM · Restricted Project, Restricted Project
void added inline comments to D125421: [TableGen] Add generation of argument register lists.
May 19 2022, 1:42 PM · Restricted Project, Restricted Project
void added a comment to D124836: [AArch64] Add support for -fzero-call-used-regs.

Friendly ping.

May 19 2022, 12:13 PM · Restricted Project, Restricted Project, Restricted Project

May 16 2022

void added a comment to D125421: [TableGen] Add generation of argument register lists.

Friendly ping. :)

May 16 2022, 12:20 PM · Restricted Project, Restricted Project

May 13 2022

void updated the diff for D125421: [TableGen] Add generation of argument register lists.

Avoid warning about zero-sized arrays:

May 13 2022, 1:26 PM · Restricted Project, Restricted Project

May 12 2022

void added inline comments to D125421: [TableGen] Add generation of argument register lists.
May 12 2022, 12:36 PM · Restricted Project, Restricted Project
void updated the diff for D125421: [TableGen] Add generation of argument register lists.

Remove the "{ 0 }" initialier since we don't need the "0" there.

May 12 2022, 12:36 PM · Restricted Project, Restricted Project

May 11 2022

void updated the diff for D125421: [TableGen] Add generation of argument register lists.

Use a better method to create an empty entry.

May 11 2022, 4:27 PM · Restricted Project, Restricted Project
void updated the diff for D125421: [TableGen] Add generation of argument register lists.

Use better variable names and StringMap.

May 11 2022, 4:16 PM · Restricted Project, Restricted Project
void added inline comments to D125421: [TableGen] Add generation of argument register lists.
May 11 2022, 4:16 PM · Restricted Project, Restricted Project
void added inline comments to D125421: [TableGen] Add generation of argument register lists.
May 11 2022, 3:34 PM · Restricted Project, Restricted Project
void updated the diff for D125421: [TableGen] Add generation of argument register lists.

Update with better documentation and variable names.

May 11 2022, 3:34 PM · Restricted Project, Restricted Project
void updated the summary of D125421: [TableGen] Add generation of argument register lists.
May 11 2022, 3:33 PM · Restricted Project, Restricted Project
void added a comment to D124836: [AArch64] Add support for -fzero-call-used-regs.

I'll split off the TableGen changes into a separate patch. It will supersede those changes here, so it shouldn't delay other reviews here. :-)

I'm referring to the changes to llvm/utils/TableGen/CallingConvEmitter.cpp and llvm/utils/TableGen/RegisterInfoEmitter.cpp. I would like to see those as a parent patch. I'm not sure what you're referring to, and it sounds like a child patch, not a parent patch.

May 11 2022, 2:14 PM · Restricted Project, Restricted Project, Restricted Project
void requested review of D125421: [TableGen] Add generation of argument register lists.
May 11 2022, 2:11 PM · Restricted Project, Restricted Project
void abandoned D125420: [AArch64] Add support for -fzero-call-used-regs.

Ugh!

May 11 2022, 2:07 PM · Restricted Project, Restricted Project, Restricted Project
void requested review of D125420: [AArch64] Add support for -fzero-call-used-regs.
May 11 2022, 2:06 PM · Restricted Project, Restricted Project, Restricted Project
void added a comment to D124836: [AArch64] Add support for -fzero-call-used-regs.

I'll split off the TableGen changes into a separate patch. It will supersede those changes here, so it shouldn't delay other reviews here. :-)

May 11 2022, 1:45 PM · Restricted Project, Restricted Project, Restricted Project
void updated the diff for D124836: [AArch64] Add support for -fzero-call-used-regs.

Fix think-o use of HasSVE. Use --check-prefixes in the testcase.

May 11 2022, 1:45 PM · Restricted Project, Restricted Project, Restricted Project

May 9 2022

void updated the diff for D124836: [AArch64] Add support for -fzero-call-used-regs.
  • Used lists of argument registers generated from AArch64CallingConv.td.
  • Add more tests for floating point and SVE.
May 9 2022, 3:23 PM · Restricted Project, Restricted Project, Restricted Project
void added a comment to D124836: [AArch64] Add support for -fzero-call-used-regs.

@peterwaller-arm @sdesmalen Could you comment on what is considered the canonical way to zero Arm registers? Is mov x1, #0 the way or mov x1, xzr or some other way?

May 9 2022, 12:33 PM · Restricted Project, Restricted Project, Restricted Project
void added inline comments to D124836: [AArch64] Add support for -fzero-call-used-regs.
May 9 2022, 12:28 PM · Restricted Project, Restricted Project, Restricted Project

May 8 2022

void updated the diff for D124836: [AArch64] Add support for -fzero-call-used-regs.
  • Support SVE registers.
  • Initial feature to gather argument registers from the *CallingConv.td files.
May 8 2022, 12:58 AM · Restricted Project, Restricted Project, Restricted Project

May 7 2022

void added inline comments to D124836: [AArch64] Add support for -fzero-call-used-regs.
May 7 2022, 3:37 AM · Restricted Project, Restricted Project, Restricted Project

May 4 2022

void added inline comments to D124836: [AArch64] Add support for -fzero-call-used-regs.
May 4 2022, 3:42 PM · Restricted Project, Restricted Project, Restricted Project

May 3 2022

void added inline comments to D124836: [AArch64] Add support for -fzero-call-used-regs.
May 3 2022, 3:23 PM · Restricted Project, Restricted Project, Restricted Project
void added inline comments to D124836: [AArch64] Add support for -fzero-call-used-regs.
May 3 2022, 3:17 PM · Restricted Project, Restricted Project, Restricted Project
void committed rGf2639cf3fe46: [randstruct] Move initializer check to be more effective (authored by void).
[randstruct] Move initializer check to be more effective
May 3 2022, 11:24 AM · Restricted Project, Restricted Project
void closed D124694: [randstruct] Move initializer check to be more effective.
May 3 2022, 11:23 AM · Restricted Project, Restricted Project
void requested review of D124836: [AArch64] Add support for -fzero-call-used-regs.
May 3 2022, 2:56 AM · Restricted Project, Restricted Project, Restricted Project

May 2 2022

void added a comment to D123763: [randstruct] Enforce using a designated init for a randomized struct.

This new test has been failing on the emscripten builders.. seemingly ever since it landed:

https://ci.chromium.org/ui/p/emscripten-releases/builders/ci/linux-test-suites/b8815286583388131569/overview

May 2 2022, 12:50 PM · Restricted Project, Restricted Project
void added a comment to D124694: [randstruct] Move initializer check to be more effective.
struct t {
   int a, b, c, d, e;
} x = { .a = 2, 4, 5, 6 };

This situation seems like it should be an error, shouldn't it? The user specified one designated initializer (yay, that one is correct), but the rest are positional initializers and so there's no telling what they actually initialize due to field randomization.

That is diagnosed as an error. The issue is that after randomization, the a field is placed at the end of the structure. The initializer checker then sees the .a = 2 and says, "Ah! That's the one at the end of the structure. Any non-designated initializers afterwards will be excess ones," which is what happens. But that warning is completely mysterious to the end users who isn't told that they can't have a non-designated initializer on a randomized structure. Moving the diagnostic allows the correct warning to be emitted instead of the "excess elements" one.

May 2 2022, 12:46 PM · Restricted Project, Restricted Project
void added a comment to D124694: [randstruct] Move initializer check to be more effective.
struct t {
   int a, b, c, d, e;
} x = { .a = 2, 4, 5, 6 };

This situation seems like it should be an error, shouldn't it? The user specified one designated initializer (yay, that one is correct), but the rest are positional initializers and so there's no telling what they actually initialize due to field randomization.

May 2 2022, 12:45 PM · Restricted Project, Restricted Project

Apr 29 2022

void requested review of D124694: [randstruct] Move initializer check to be more effective.
Apr 29 2022, 1:15 PM · Restricted Project, Restricted Project
void added inline comments to D123763: [randstruct] Enforce using a designated init for a randomized struct.
Apr 29 2022, 1:09 PM · Restricted Project, Restricted Project
void committed rG6f7970083029: [randstruct] Automatically randomize a structure of function pointers (authored by void).
[randstruct] Automatically randomize a structure of function pointers
Apr 29 2022, 11:05 AM · Restricted Project, Restricted Project
void closed D123544: [randstruct] Automatically randomize a structure of function pointers.
Apr 29 2022, 11:05 AM · Restricted Project, Restricted Project

Apr 28 2022

void updated the diff for D123544: [randstruct] Automatically randomize a structure of function pointers.

Rebase with top-of-tree.

Apr 28 2022, 5:23 PM · Restricted Project, Restricted Project
void committed rG463790bfc70e: [randstruct] Randomize all elements of a record (authored by void).
[randstruct] Randomize all elements of a record
Apr 28 2022, 12:01 PM · Restricted Project, Restricted Project
void closed D123958: [randstruct] Randomize all elements of a record.
Apr 28 2022, 12:01 PM · Restricted Project, Restricted Project

Apr 27 2022

void committed rG8f2ec974d1cf: [X86] Move target-generic code into CodeGen [NFC] (authored by void).
[X86] Move target-generic code into CodeGen [NFC]
Apr 27 2022, 3:38 PM · Restricted Project, Restricted Project
void closed D124566: [X86] Move target-generic code into CodeGen [NFC].
Apr 27 2022, 3:37 PM · Restricted Project, Restricted Project
void requested review of D124566: [X86] Move target-generic code into CodeGen [NFC].
Apr 27 2022, 3:36 PM · Restricted Project, Restricted Project
void updated the diff for D123958: [randstruct] Randomize all elements of a record.

Fix test.

Apr 27 2022, 1:15 PM · Restricted Project, Restricted Project
void added inline comments to D123958: [randstruct] Randomize all elements of a record.
Apr 27 2022, 1:06 PM · Restricted Project, Restricted Project
void updated the diff for D123958: [randstruct] Randomize all elements of a record.

Add a few more tests and remove a dead check.

Apr 27 2022, 1:06 PM · Restricted Project, Restricted Project

Apr 26 2022

void added a comment to D123958: [randstruct] Randomize all elements of a record.

Gentle ping.

Apr 26 2022, 10:15 PM · Restricted Project, Restricted Project

Apr 21 2022

void updated subscribers of D124199: [randstruct] Check final randomized layout ordering.

Maskray?

Apr 21 2022, 11:19 PM · Restricted Project, Restricted Project
void committed rGa7815d33bf8f: [randstruct] Check final randomized layout ordering (authored by void).
[randstruct] Check final randomized layout ordering
Apr 21 2022, 7:41 PM · Restricted Project, Restricted Project
void closed D124199: [randstruct] Check final randomized layout ordering.
Apr 21 2022, 7:41 PM · Restricted Project, Restricted Project
void updated the diff for D124199: [randstruct] Check final randomized layout ordering.

Fixed "std::vector" mishap

Apr 21 2022, 7:17 PM · Restricted Project, Restricted Project
void added inline comments to D124199: [randstruct] Check final randomized layout ordering.
Apr 21 2022, 7:15 PM · Restricted Project, Restricted Project
void requested review of D124199: [randstruct] Check final randomized layout ordering.
Apr 21 2022, 12:39 PM · Restricted Project, Restricted Project

Apr 20 2022

void updated the summary of D123958: [randstruct] Randomize all elements of a record.
Apr 20 2022, 2:32 PM · Restricted Project, Restricted Project
void updated the diff for D123958: [randstruct] Randomize all elements of a record.

Correctly handle all types of Decls that can be found in a RecordDecl.

Apr 20 2022, 2:30 PM · Restricted Project, Restricted Project
void added a comment to D123958: [randstruct] Randomize all elements of a record.

I think you'll need a more targeted approach than assuming the only kinds of declarations in a struct are field-like in C.

It seems that the issue you've got is with anonymous objects in a structure where the inner fields are available for lookup in the outer structure. One question I have is: what's the expectation for the user? There's two ways to look at this. 1) The anonymous object is a single field; that its members can be found in the outer object is not relevant. 2) The fields of the anonymous object should also be randomized. The same is true for any inner structure, not just anonymous ones.

I had assumed that any structure not marked for randomization would not be randomized. Based on that, I don't think inner structure objects (anonymous or otherwise) should automatically randomize their fields. WDYT?

We don't randomize inner structures unless they have the randomize_layout flag. That's always been the case, and this patch doesn't change that.

That's good, I misunderstood originally, so thanks!

The issue is that we were dropping the inner structures/unions because they aren't FieldDecls, but RecordDecls, with an IndirectFieldDecl if the inner structure is anonymous. The IndirectFieldDecl bits appear after the RecordDecl they're attached to, but doesn't seem like the ordering is important. The IndirectFieldDecl thing is there so that the anonymous fields are available in the outer structure.

Agreed that we need to fix that behavior, but I think it's pretty fragile to assume every declaration in a struct can be reordered. I mentioned static assert decls above as one obvious example, but also consider things like:

struct S {
  enum E {
    One,
  };

  enum E whatever;
} __attribute__((randomize_layout));
Apr 20 2022, 12:37 PM · Restricted Project, Restricted Project

Apr 19 2022

void added a comment to D123958: [randstruct] Randomize all elements of a record.

I think you'll need a more targeted approach than assuming the only kinds of declarations in a struct are field-like in C.

It seems that the issue you've got is with anonymous objects in a structure where the inner fields are available for lookup in the outer structure. One question I have is: what's the expectation for the user? There's two ways to look at this. 1) The anonymous object is a single field; that its members can be found in the outer object is not relevant. 2) The fields of the anonymous object should also be randomized. The same is true for any inner structure, not just anonymous ones.

I had assumed that any structure not marked for randomization would not be randomized. Based on that, I don't think inner structure objects (anonymous or otherwise) should automatically randomize their fields. WDYT?

Apr 19 2022, 11:06 PM · Restricted Project, Restricted Project

Apr 18 2022

void requested review of D123958: [randstruct] Randomize all elements of a record.
Apr 18 2022, 1:25 PM · Restricted Project, Restricted Project

Apr 16 2022

void committed rG7f31b4a917d8: [randstruct] Enforce using a designated init for a randomized struct (authored by void).
[randstruct] Enforce using a designated init for a randomized struct
Apr 16 2022, 11:26 PM · Restricted Project, Restricted Project

Apr 15 2022

void updated subscribers of rG2a404cdfd8bc: [randstruct] Force errors for all platforms.

See https://lab.llvm.org/buildbot#builders/186/builds/5509

Apr 15 2022, 3:56 PM · Restricted Project, Restricted Project
void committed rG2a404cdfd8bc: [randstruct] Force errors for all platforms (authored by void).
[randstruct] Force errors for all platforms
Apr 15 2022, 3:17 PM · Restricted Project, Restricted Project
void committed rGaed923b1246a: [randstruct] Enforce using a designated init for a randomized struct (authored by void).
[randstruct] Enforce using a designated init for a randomized struct
Apr 15 2022, 12:30 PM · Restricted Project, Restricted Project
void closed D123763: [randstruct] Enforce using a designated init for a randomized struct.
Apr 15 2022, 12:29 PM · Restricted Project, Restricted Project
void updated the diff for D123763: [randstruct] Enforce using a designated init for a randomized struct.

Add tests for empty and single element structs.

Apr 15 2022, 11:40 AM · Restricted Project, Restricted Project

Apr 14 2022

void committed rG8c77a75fb6a8: [randstruct] Add test for "-frandomize-layout-seed-file" flag (authored by void).
[randstruct] Add test for "-frandomize-layout-seed-file" flag
Apr 14 2022, 4:36 PM · Restricted Project, Restricted Project
void added a reverting change for rG31ea4798ad09: [randstruct] Add test for "-frandomize-layout-seed-file" flag: rG27dead3e3a53: Revert "[randstruct] Add test for "-frandomize-layout-seed-file" flag".
Apr 14 2022, 4:07 PM · Restricted Project, Restricted Project
void committed rG27dead3e3a53: Revert "[randstruct] Add test for "-frandomize-layout-seed-file" flag" (authored by void).
Revert "[randstruct] Add test for "-frandomize-layout-seed-file" flag"
Apr 14 2022, 4:07 PM · Restricted Project, Restricted Project
void added a reverting change for D123636: [randstruct] Add test for "-frandomize-layout-seed-file" flag: rG27dead3e3a53: Revert "[randstruct] Add test for "-frandomize-layout-seed-file" flag".
Apr 14 2022, 4:07 PM · Restricted Project, Restricted Project
void committed rG31ea4798ad09: [randstruct] Add test for "-frandomize-layout-seed-file" flag (authored by void).
[randstruct] Add test for "-frandomize-layout-seed-file" flag
Apr 14 2022, 3:42 PM · Restricted Project, Restricted Project
void closed D123636: [randstruct] Add test for "-frandomize-layout-seed-file" flag.
Apr 14 2022, 3:41 PM · Restricted Project, Restricted Project
void updated the diff for D123636: [randstruct] Add test for "-frandomize-layout-seed-file" flag.

Rebase.

Apr 14 2022, 3:39 PM · Restricted Project, Restricted Project
void added inline comments to D123636: [randstruct] Add test for "-frandomize-layout-seed-file" flag.
Apr 14 2022, 2:56 PM · Restricted Project, Restricted Project
void updated the diff for D123636: [randstruct] Add test for "-frandomize-layout-seed-file" flag.

Use "unique_ptr" when possible.

Apr 14 2022, 2:51 PM · Restricted Project, Restricted Project
void added inline comments to D123636: [randstruct] Add test for "-frandomize-layout-seed-file" flag.
Apr 14 2022, 2:18 PM · Restricted Project, Restricted Project
void added a comment to D123763: [randstruct] Enforce using a designated init for a randomized struct.

Updated with those changes.

Apr 14 2022, 12:26 PM · Restricted Project, Restricted Project
void updated the diff for D123763: [randstruct] Enforce using a designated init for a randomized struct.

Add some smoke tests.

Apr 14 2022, 12:26 PM · Restricted Project, Restricted Project
void updated the diff for D123763: [randstruct] Enforce using a designated init for a randomized struct.

Accept initialzers of the forms:

Apr 14 2022, 12:21 PM · Restricted Project, Restricted Project
void requested review of D123763: [randstruct] Enforce using a designated init for a randomized struct.
Apr 14 2022, 12:38 AM · Restricted Project, Restricted Project

Apr 13 2022

void added inline comments to D123636: [randstruct] Add test for "-frandomize-layout-seed-file" flag.
Apr 13 2022, 1:31 PM · Restricted Project, Restricted Project
void added a comment to D123544: [randstruct] Automatically randomize a structure of function pointers.

Let me work on that. But otherwise are you okay with this patch?

Yes, I'm okay with the direction of this patch. However, because this still automatically randomizes some structure layouts once the user passes the flag, I think the diagnostic above should perhaps land first unless there's some strong reason not to. (To be honest, I probably should have insisted on it in the first patch, but this one feels significantly more dangerous because it involves function pointers specifically and is more of an "automatic" feature than the first patch.)

Apr 13 2022, 1:00 PM · Restricted Project, Restricted Project

Apr 12 2022

void added a comment to D123544: [randstruct] Automatically randomize a structure of function pointers.

If we had error diagnostics when the user is about to shoot their foot off, I'd be more comfortable with the automatic hardening behavior.

This feature IMHO should be enabled with simple easy to understand flag, not silently and automatically do something which may break code or create surprises in debuggers.

Apr 12 2022, 3:03 PM · Restricted Project, Restricted Project
void added a comment to D123544: [randstruct] Automatically randomize a structure of function pointers.

However, I had forgotten that the base feature *requires* the user to pass a randomization seed via a flag in addition to requiring the attribute (thank you for bringing that back to my attention). Because this feature requires a feature flag to enable it, this behavior *is* a conforming extension (the user has to take an action to get the new behavior). That said, I'm still not convinced we want to do this automagically for users -- it's *really* easy for that flag to be set in a makefile somewhere and the user has no idea that their (non-designated) initialization is now a security vulnerability. If we had error diagnostics when the user is about to shoot their foot off, I'd be more comfortable with the automatic hardening behavior.

Apr 12 2022, 3:01 PM · Restricted Project, Restricted Project
void requested review of D123636: [randstruct] Add test for "-frandomize-layout-seed-file" flag.
Apr 12 2022, 2:53 PM · Restricted Project, Restricted Project
void added a comment to D123544: [randstruct] Automatically randomize a structure of function pointers.

Does this not lead to non-deterministic/non-reproducible builds?

Apr 12 2022, 11:51 AM · Restricted Project, Restricted Project
void added a comment to D121556: [randstruct] Add randomize structure layout support.

7aa8c38a9e190aea14116028c38b1d9f54cbb0b3 still uses std::shuffle, not incorporating the llvm::shuffle fixes I did.

You said it was still failing after the std::shuffle to llvm::shuffle change.

By saying it still failed, I meant there were other Windows vs non-Windows differences, not that std::shuffle=>llvm::shuffle was an unintended change.

So does it work or not? If I change it to llvm::shuffle, will the tests fail or will they pass regardless of the platform?

If you change std::shuffle to llvm::shuffle and add back tests like EXPECT_EQ(Expected, getFieldNamesFromRecord(RD));, the test will likely fail on Windows.
I recall that @aaron.ballman uses Windows and may help you find the differences.

It was also failing on MacOS. And it failed a different way on another Windows version. That's why I removed the test for the deterministic shuffle.

I tend to agree with your I think it's just a case where Windows' algorithm for std::mt19937 is subtly different than the one for Linux.

The only other option would be to add the EXPECT_* stuff on one platform (like Linux). I suppose that would be better than nothing.

Here's what has me confused... You're using std::mt19937 which is a very specific random number algorithm and you're giving it the same seed. I don't think we *should* be getting different behavior from the random number generator across platforms. The issue is the call to std::shuffle (see https://en.cppreference.com/w/cpp/algorithm/random_shuffle#Notes), so I think using llvm::shuffle will fix all the tests on all the platforms.

Apr 12 2022, 11:00 AM · Restricted Project, Restricted Project