Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Security-Testing-Five/cppwinrt
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: microsoft/cppwinrt
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 3 commits
  • 3 files changed
  • 3 contributors

Commits on Jul 8, 2026

  1. Fix C4819 warning: replace non-ASCII em dash in base_macros.h comment (

    …microsoft#1606)
    
    * Initial plan
    
    * Fix C4819 warning: replace non-ASCII em dash with ASCII hyphen in base_macros.h comment
    
    ---------
    
    Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
    Copilot authored Jul 8, 2026
    Configuration menu
    Copy the full SHA
    a535d38 View commit details
    Browse the repository at this point in the history

Commits on Jul 27, 2026

  1. Fix race condition in cancellation setup/teardown (microsoft#1609)

    The code failed to handle three cases.
    
    1. A cancellation is in progress when a cancellable awaitable begins.
    2. A cancellation is in progress when a cancellable awaitable ends.
    3. A cancellation is in progress when a cancel() request is made.
    
    The m_canceller member has one of these three values:
    
    * nullptr, meaning that there is nothing to cancel.
      It has this value when the coroutine is not awaiting, or if it is
      awaiting something that cannot be cancelled.
    * cancelling_ptr, meaning that another thread (not the coroutine thread)
      is in the middle of cancellation request.
    * function pointer, representing the function to call to cancel the await.
    
    In case 1, we should not overwrite the canceling_ptr with the
    function pointer, because only the code doing the cancel()
    can transition into/out of cancelling_ptr.
    
    In case 2, we intended to spin until the m_canceller is no longer
    cancelling_ptr, but we used m_canceller.exchange(nullptr) in a loop,
    which means that if m_canceller was cancelling_ptr, we overwrite it
    with nullptr. As a result, the "while" loop always exits after one iteration.
    We need to spin on the m_canceller without modifying it if it is cancelling_ptr.
    
    In case 3, cancel() function resets m_cancelling back to nullptr,
    even if the value was cancelling_ptr on entry, prematurely declaring
    that the existing cancel() has completed. If the original value was
    cancelling_ptr, we should leave it that way.
    
    There are still other cases not handled:
    
    * Coroutine already cancelled when a co_await starts.
    
    In this case, we never call the canceller, so the coroutine fails
    to propagate cancellation. This will require a broader fix, so I'm not
    going to fix it in this PR. This PR is primarily about fixing the crash
    caused by case 2. Cases 1 and 3 were fixed opportunistically.
    oldnewthing authored Jul 27, 2026
    Configuration menu
    Copy the full SHA
    d3d92d7 View commit details
    Browse the repository at this point in the history

Commits on Jul 28, 2026

  1. Add <ratio> header to base_includes.h (microsoft#1612)

    base_types.h uses std::ratio_multiply, which is defined in <ratio>. Under strict include-what-you-use rules not referencing this header can lead to weird build breaks.
    Penguinwizzard authored Jul 28, 2026
    Configuration menu
    Copy the full SHA
    d6cff31 View commit details
    Browse the repository at this point in the history
Loading