microsoft / microsoft/libHttpClient

XTaskQueueSetCurrentProcessTaskQueue SAL should use _In_opt_.

Open Beginner friendly
#958 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
295
Forks
144
Avg merge
2d 19h
Merged PRs (30d)
2

Description

The SAL for XTaskQueueSetCurrentProcessTaskQueue is incorrect; it should be allowing a null parameter.

/// <summary>
/// Sets the given task queue as the process wide task queue.  The
/// queue can be set to nullptr, in which case XTaskQueueGetCurrentProcessTaskQueue will
/// also return nullptr. The provided queue will have its handle duplicated
/// and any existing process task queue will have its handle closed.
/// </summary>
/// <param name='queue'>The queue to set up as the default task queue for the procces.</param>
STDAPI_(void) XTaskQueueSetCurrentProcessTaskQueue(
    _In_ XTaskQueueHandle queue
    ) noexcept;

That should use _In_opt_.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start from the XTaskQueueSetCurrentProcessTaskQueue declaration shown in the issue and inspect the surrounding public API declarations. Update the queue parameter annotation to allow nullptr, then verify that the declaration matches the documented behavior and any related API checks.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
api
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.