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

pool_test is flaky on OSX 10.9.5 #131

Open
zackthehuman opened this issue Feb 13, 2016 · 2 comments
Open

pool_test is flaky on OSX 10.9.5 #131

zackthehuman opened this issue Feb 13, 2016 · 2 comments

Comments

@zackthehuman
Copy link
Contributor

It looks as if pool_test is not 100% reliable, at least not on my mac. Sometimes everything passes, but most of the time there is a single assertion the fails.

-------------------------------------------------------------------------------
TestPoolPointers
-------------------------------------------------------------------------------
/Users/zack/Dev/entityx-build/entityx/help/Pool_test.cc:45
...............................................................................

/Users/zack/Dev/entityx-build/entityx/help/Pool_test.cc:65: FAILED:
  REQUIRE( extrapolated_p16 != static_cast<void*>(p16) )
with expansion:
  0xb05540d9d67f0000 != 0xb05540d9d67f0000

===============================================================================
3 test cases - 1 failed (13 assertions - 1 failed)

Running make test over and over will yield success sometimes, but failure most of the time. This is built using Apple clang:

-- The C compiler identification is AppleClang 5.0.0.5000279
-- The CXX compiler identification is AppleClang 5.0.0.5000279

I thought that the failures were related to a change I had in a local branch but it turns out that this bejavior is also present in the current master.

@alecthomas
Copy link
Owner

I've seen that myself, I'll have to take a bit more of a look.

@Teivaz
Copy link

Teivaz commented Oct 7, 2018

But shouldn't the memory layout be like:

00000000----------------
       ^^
   p0+7  p0+8

--------1111111111111111
        ^       ^
      p8         p8+8
                ^
                 p16

which means

pool.get(7) == pool.get(0)+7;
pool.get(8) != pool.get(0)+8;
pool.get(16) == pool.get(8)+8;

And the failed check should be inverted.

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

No branches or pull requests

3 participants