Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: 13d2ab8bbbcb68824b0e53e403df7b9dd3ec55d5
      
https://github.com/Perl/perl5/commit/13d2ab8bbbcb68824b0e53e403df7b9dd3ec55d5
  Author: Tony Cook <[email protected]>
  Date:   2020-12-14 (Mon, 14 Dec 2020)

  Changed paths:
    M ext/XS-APItest/APItest.xs
    M thread.h

  Log Message:
  -----------
  build test for the read/write mutex macros

This fails to compile


  Commit: 385ff59891f97046e99af32c3718c9d5cea167e6
      
https://github.com/Perl/perl5/commit/385ff59891f97046e99af32c3718c9d5cea167e6
  Author: Tony Cook <[email protected]>
  Date:   2020-12-14 (Mon, 14 Dec 2020)

  Changed paths:
    M thread.h

  Log Message:
  -----------
  consistently parenthesise the RW lock macro arguments

and fix the mixed up pointer vs non-pointer use of the mutex
argument.

Without the parentheses (or without the new tests in the previous
commit) for code like;

 PERL_WRITE_LOCK(&PL_some_mutex);

the MUTEX_LOCK(mutex.lock) in that code would expand to:

  MUTEX_LOCK(&PL_some_mutex.lock);

and happen to work,  even though the next line has:

  if ((mutex)->readers_count)

treating the mutex parameter as a pointer.

With the parentheses the MUTEX_LOCK(mutex.lock) becomes:

  MUTEX_LOCK((&PL_some_mutex).lock);

which as expected fails to compile in a similar way to the pointer
test code in the previous commit.


  Commit: 7d3dc46a32cd59eedc4b0f4aa00147ad35a398ef
      
https://github.com/Perl/perl5/commit/7d3dc46a32cd59eedc4b0f4aa00147ad35a398ef
  Author: Tony Cook <[email protected]>
  Date:   2020-12-14 (Mon, 14 Dec 2020)

  Changed paths:
    M ext/XS-APItest/APItest.pm

  Log Message:
  -----------
  bump $XS::APItest::VERSION


Compare: https://github.com/Perl/perl5/compare/eb6cdcc1bc6e...7d3dc46a32cd

Reply via email to