Skip to content

Conversation

thetruestblue
Copy link

@thetruestblue thetruestblue commented Sep 15, 2025

commit fe85e2c (HEAD -> blueg/add_dispatch_apply, thetruestblue/blueg/add_dispatch_apply, origin/blueg/add_dispatch_apply)
Author: Dan Blackwell dan_blackwell@apple.com
Date: Fri Aug 1 16:33:23 2025 +0100

[TSan] Fix asan_mac.cpp function pointer cast warnings (#151517)

Fixes these compiler warnings:
```
.../llvm-project/compiler-rt/lib/asan/asan_mac.cpp:252:4: warning: cast from 'dispatch_function_t' (aka 'void (*)(void *)') to 'void (*)(void *, size_t)' (aka 'void (*)(void *, unsigned long)') converts to incompatible function type [-Wcast-function-type-mismatch]
  252 |   ((void (*)(void *, size_t))asan_ctxt->func)(asan_ctxt->block, iteration);
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.../llvm-project/compiler-rt/lib/asan/asan_mac.cpp:259:32: warning: cast from 'void (*)(void *, size_t)' (aka 'void (*)(void *, unsigned long)') to 'dispatch_function_t' (aka 'void (*)(void *)') converts to incompatible function type [-Wcast-function-type-mismatch]
  259 |       alloc_asan_context(ctxt, (dispatch_function_t)work, &stack);
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~
```

(cherry picked from commit e7e74945a6c77349963e03ba42989faad715b6bc)

commit 214566e
Author: thetruestblue bblueconway@gmail.com
Date: Wed Jul 23 10:27:09 2025 -0700

[ASan][Darwin][GCD] Add interceptor for dispatch_apply (#149238)

ASan had a gap in coverage for wqthreads blocks submitted by
dispatch_apply

This adds interceptor for dispatch_apply and dispatch_apply_f and adds a
test that a failure in a dispatch apply block contains thread and stack
info.

rdar://139660648
(cherry picked from commit 5ce04b473cd6cd3cc0c85cf21d69aa956e7ba868)

commit 3d4054c
Author: Justin King jcking@google.com
Date: Tue Jul 22 15:47:23 2025 -0700

asan: refactor interceptor allocation/deallocation functions (#145087)

Do some refactoring to allocation/deallocation interceptors. Expose
explicit per-alloc_type functions and stop accepting explicit AllocType.
This ensures we do not accidentally mix.

NOTE: This change rejects attempts to call `operator new(<some_size>,
static_cast<std::align_val_t>(0))`.

For https://github.com/llvm/llvm-project/issues/144435

Signed-off-by: Justin King <jcking@google.com>
(cherry picked from commit 681c2ee4dfbf10b3ef74afd1a2c72f844771e602)

jcking and others added 3 commits September 15, 2025 11:13
…5087)

Do some refactoring to allocation/deallocation interceptors. Expose
explicit per-alloc_type functions and stop accepting explicit AllocType.
This ensures we do not accidentally mix.

NOTE: This change rejects attempts to call `operator new(<some_size>,
static_cast<std::align_val_t>(0))`.

For llvm#144435

Signed-off-by: Justin King <jcking@google.com>
(cherry picked from commit 681c2ee)
ASan had a gap in coverage for wqthreads blocks submitted by
dispatch_apply

This adds interceptor for dispatch_apply and dispatch_apply_f and adds a
test that a failure in a dispatch apply block contains thread and stack
info.

rdar://139660648
(cherry picked from commit 5ce04b4)
Fixes these compiler warnings:
```
.../llvm-project/compiler-rt/lib/asan/asan_mac.cpp:252:4: warning: cast from 'dispatch_function_t' (aka 'void (*)(void *)') to 'void (*)(void *, size_t)' (aka 'void (*)(void *, unsigned long)') converts to incompatible function type [-Wcast-function-type-mismatch]
  252 |   ((void (*)(void *, size_t))asan_ctxt->func)(asan_ctxt->block, iteration);
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.../llvm-project/compiler-rt/lib/asan/asan_mac.cpp:259:32: warning: cast from 'void (*)(void *, size_t)' (aka 'void (*)(void *, unsigned long)') to 'dispatch_function_t' (aka 'void (*)(void *)') converts to incompatible function type [-Wcast-function-type-mismatch]
  259 |       alloc_asan_context(ctxt, (dispatch_function_t)work, &stack);
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~
```

(cherry picked from commit e7e7494)
@thetruestblue thetruestblue changed the title Blueg/add dispatch apply Cherry Pick Commits for adding interceptor for dispatch apply Sep 15, 2025
@thetruestblue
Copy link
Author

@swift-ci please test

@AnthonyLatsis
Copy link

@swift-ci please test llvm

Copy link

@DanBlackwell DanBlackwell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI failures seem unrelated to these changes. This looks good to go, thanks!

@thetruestblue
Copy link
Author

@swift-ci please test llvm

lets try it again

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

Successfully merging this pull request may close these issues.

4 participants