[all-commits] [llvm/llvm-project] 3d928e: [TSan] Fix pointer/type-mismatch bug in test that ...

Julian Lettner via All-commits all-commits at lists.llvm.org
Fri Aug 26 16:31:56 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3d928e1d28c602c4036f50b7565637e7badc4467
      https://github.com/llvm/llvm-project/commit/3d928e1d28c602c4036f50b7565637e7badc4467
  Author: Julian Lettner <julian.lettner at apple.com>
  Date:   2022-08-26 (Fri, 26 Aug 2022)

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

  Log Message:
  -----------
  [TSan] Fix pointer/type-mismatch bug in test that has turned into a compile error

Fixes this test compile error:
```
<path>/compiler-rt/test/tsan/debug_alloc_stack.cpp:54:7: error: no matching function for call to '__tsan_get_alloc_stack'
      __tsan_get_alloc_stack(mem, trace, num_frames, &thread_id, &thread_os_id);
      ^~~~~~~~~~~~~~~~~~~~~~
<path>/compiler-rt/test/tsan/debug_alloc_stack.cpp:17:16: note: candidate function not viable: no known conversion from 'uint64_t **' (aka 'unsigned long long **') to 'uint64_t *' (aka 'unsigned long long *') for 5th argument; remove &
extern "C" int __tsan_get_alloc_stack(void *addr, void **trace, size_t size,
               ^
<path>/compiler-rt/test/tsan/debug_alloc_stack.cpp:61:46: warning: format specifies type 'unsigned long long' but the argument has type 'uint64_t *' (aka 'unsigned long long *') [-Wformat]
  fprintf(stderr, "thread os id = 0x%llx\n", thread_os_id);
                                    ~~~~     ^~~~~~~~~~~~
1 warning and 1 error generated.
```




More information about the All-commits mailing list