clang-randstruct / llvm-project

Randomize the order of fields in a structure layout as a compile-time hardening feature
3 stars 1 forks source link

Keep test seed consistent between different operating systems. #24

Open tim-pugh opened 5 years ago

tim-pugh commented 5 years ago

It's been discovered that different operating systems can create different seeds (we've encountered this with OSX and Ubuntu systems). Thus when we create tests we will need to have our seed for programs under test to be consistent.

This will be necessary for adapting our POC.c file (to be renamed when sending a patch upstream) into their tests test suite module.

tim-pugh commented 5 years ago

We believe that provided we can pass a seed, it'll be consistent between OSX, Linux and Windows.

We'll have to test for this. Assuming we have the same seed and the output is the same against all 3 platform, this will be simple.

If not, we'll have to capture all 3 platforms outputs.

I would actually recommend we do a check for windows and osx and skip them for the time being. These can be accounted for later once we have it strapped into the test harness.

In other words, lets only worry about linux for now

tim-pugh commented 5 years ago

I believe #45 will resolve this, but I'd like to test to be sure.