Skip to content

Commit

Permalink
use aws_min & enable sanitizer in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
xiazhvera committed Jan 8, 2025
1 parent 54f4883 commit 84c6c4c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ jobs:
fail-fast: false
matrix:
eventloop: ["kqueue", "dispatch_queue"]
sanitizers: [",thread", ",address,undefined"]
steps:
- uses: aws-actions/configure-aws-credentials@v4
with:
Expand All @@ -242,7 +243,7 @@ jobs:
run: |
python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
chmod a+x builder
./builder build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DAWS_USE_APPLE_NETWORK_FRAMEWORK=${{ matrix.eventloop == 'dispatch_queue' && 'ON' || 'OFF' }}
./builder build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DAWS_USE_APPLE_NETWORK_FRAMEWORK=${{ matrix.eventloop == 'dispatch_queue' && 'ON' || 'OFF' }} --cmake-extra=-DENABLE_SANITIZERS=ON --cmake-extra=-DSANITIZERS="${{ matrix.sanitizers }}"
macos-x64:
runs-on: macos-14-large # latest
Expand All @@ -263,6 +264,7 @@ jobs:
fail-fast: false
matrix:
eventloop: ["kqueue", "dispatch_queue"]
sanitizers: [",thread", ",address,undefined"]
steps:
- uses: aws-actions/configure-aws-credentials@v4
with:
Expand All @@ -272,7 +274,7 @@ jobs:
run: |
python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
chmod a+x builder
./builder build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DAWS_USE_APPLE_NETWORK_FRAMEWORK=${{ matrix.eventloop == 'dispatch_queue' && 'ON' || 'OFF' }} --config Debug
./builder build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DAWS_USE_APPLE_NETWORK_FRAMEWORK=${{ matrix.eventloop == 'dispatch_queue' && 'ON' || 'OFF' }} --cmake-extra=-DENABLE_SANITIZERS=ON --cmake-extra=-DSANITIZERS="${{ matrix.sanitizers }}" --config Debug
freebsd:
runs-on: ubuntu-24.04 # latest
Expand Down
2 changes: 1 addition & 1 deletion source/darwin/dispatch_queue_event_loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ static void s_try_schedule_new_iteration(struct dispatch_loop_context *dispatch_
* unnecessarily, even if the app has shutdown. To avoid this, Ensure an iteration is scheduled within a
* 1-second interval to prevent it from remaining in the Apple dispatch queue indefinitely.
*/
delta = MIN(delta, AWS_TIMESTAMP_NANOS);
delta = aws_min_u64(delta, AWS_TIMESTAMP_NANOS);

if (delta == 0) {
// dispatch_after_f(0 , ...) is equivclient to dispatch_async_f(...) functionality wise, while
Expand Down

0 comments on commit 84c6c4c

Please sign in to comment.