1. Jun 16, 2019
  2. Jun 09, 2019
    • Matthew Fernandez's avatar
      move state_depth higher in header.c · 30950520
      Matthew Fernandez authored
      We're about to need to call it earlier in header.c.
      
      Github: related to #131 "minimal trace mode"
      30950520
    • Matthew Fernandez's avatar
      implement printing functionality for 128-bit types · 57e4a9be
      Matthew Fernandez authored
      Github: related to #132 "handle wider scalar types"
      57e4a9be
    • Matthew Fernandez's avatar
    • Matthew Fernandez's avatar
      fix final thread seeing a stale local_seen · 8cf9d785
      Matthew Fernandez authored
      There was a race condition involving the rendezvous opt out and set expansion. I
      can think of two ways in which the same problem occurs. Firstly:
      
        1. Thread A calls error() and begins the exit flow
        2. Other threads begin a set expansion and migration
        3. Thread A opts out of the rendezvous protocol
        4. Other threads finish the migration and pass through the rendezvous point
      
      Secondly:
      
        1. Thread A calls error() and begins the exit flow
        2. Other threads begin a set expansion and migration
        3. Other threads finish the migration and arrive at the rendezvous point
        4. Thread A opts out of the rendezvous protocol
      
      Observe that in both these scenarios the reference count of the old seen set
      never drops to zero because the rendezvous opt out does not decrement it. This
      means that no thread thinks it is the leader and the global_seen pointer doesn't
      get updated. As a result, thread A now has a stale local_seen pointer that
      points to a set full of tombstones.
      
      We fix this with three relevant changes in this commit:
      
        1. Shift the next seen set into global_seen in the rendezvous interstice
           instead of prior. This ensures that this action is always performed by a
           thread when we pass through the rendezvous point.
        2. Re-acquire a local_seen pointer in exit_with() after thread joining. This
           ensures that the final thread has a local_seen that points at the currently
           active global_seen set.
        3. Drop the reference count to the global_seen set when opting out of the
           rendezvous protocol. This is not strictly necessary, but it allows us to
           preserve the property (and assertion) in refcounted_ptr_shift that the
           reference count is zero at this point.
      
      The problem addressed here was never observed in the wild but rather something I
      realised could happen by thinking about the concurrency interactions. The
      changes described above should have no measurable impact on runtime or memory
      usage.
      
      Github: closes #124 "can the final thread see a stale local_seen?"
      8cf9d785
    • Matthew Fernandez's avatar
      call state_depth to get counterexample length instead of open coding · 335e8253
      Matthew Fernandez authored
      This change has no functional effect, just neater.
      335e8253
  3. Jun 07, 2019
  4. Jun 06, 2019
  5. Jun 05, 2019
  6. Jun 04, 2019
    • Matthew Fernandez's avatar
      fix: don't define _POSIX_C_SOURCE on FreeBSD · 43054e83
      Matthew Fernandez authored
      Curiously this was breaking compilation on FreeBSD by hiding some type
      definitions. Casting around on the internet to debug the problem, most
      references led me back to [0]. This seems odd, but apparently the right thing to
      do is #define nothing on FreeBSD.
      
        [0]: https://lists.freebsd.org/pipermail/freebsd-standards/2004-March/000474.html
      
      Github: related to #134 "Tests fail: UnicodeDecodeError: 'ascii' codec can't
        decode byte 0xe2 in position 120: ordinal not in range(128)"
      43054e83
    • Matthew Fernandez's avatar
      fix: decode data received from subprocess as UTF-8 in the test suite · a9e327cd
      Matthew Fernandez authored
      This sort of all just worked when using a UTF-8 locale, but when your locale is
      not setup this way exceptions occur. The problem is that we should have been
      converting the binary data we received from a subprocess to a string immediately
      if we intended to then go on and treat it like a string.
      
      Github: related to #134 "Tests fail: UnicodeDecodeError: 'ascii' codec can't
        decode byte 0xe2 in position 120: ordinal not in range(128)"
      a9e327cd
    • Matthew Fernandez's avatar
      fix: open test cases explicitly as UTF-8 · a88c8d2f
      Matthew Fernandez authored
      If a non-UTF-8 locale is set, reading UTF-8 characters from the test files
      fails.
      
      Github: related to #134 "Tests fail: UnicodeDecodeError: 'ascii' codec can't
        decode byte 0xe2 in position 120: ordinal not in range(128)"
      a88c8d2f
  7. Jun 03, 2019
  8. Jun 02, 2019
  9. Jun 01, 2019
  10. May 30, 2019