[all-commits] [llvm/llvm-project] 7cc6d0: [TSAN] Fix infinite loop on targets where char is ...

Nemanja Ivanovic via All-commits all-commits at lists.llvm.org
Sat Apr 11 05:13:18 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 7cc6d0cc90e24a00a6eefd762cac160c795fc420
      https://github.com/llvm/llvm-project/commit/7cc6d0cc90e24a00a6eefd762cac160c795fc420
  Author: Nemanja Ivanovic <nemanja.i.ibm at gmail.com>
  Date:   2020-04-11 (Sat, 11 Apr 2020)

  Changed paths:
    M compiler-rt/test/tsan/fiber_cleanup.cpp

  Log Message:
  -----------
  [TSAN] Fix infinite loop on targets where char is unsigned

For targets where char is unsigned (like PowerPC), something like
char c = fgetc(...) will never produce a char that will compare
equal to EOF so this loop does not terminate.
Change the type to int (which appears to be the POSIX return type
for fgetc).
This allows the test case to terminate normally on PPC.




More information about the All-commits mailing list