microsoft / microsoft/STL

`<memory_resource>`: `null_memory_resource` shouldn't have `extern "C"` linkage

Open
#3,752 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug vNext
Dominant language
C++
Stars
11.1k
Forks
1.7k
Avg merge
4d 15h
Merged PRs (30d)
22

Description

Describe the bug

According to [using.linkage]/1, std::pmr::null_memory_resource needs to have extern "C++" linkage, but MSVC STL currently gives it extern "C" linkage.

https://github.com/microsoft/STL/blob/c8d1efb6d504f6392acf8f6d01fd703f7c8826c0/stl/inc/memory_resource#L46

Additional context

null_memory_resource is currently dll-exported, so changing it to have extern "C++" linkage would break binary compatibility.

vNext note: Resolving this issue will require breaking binary compatibility. We won't be able to accept pull requests for this issue until the vNext branch is available. See #169 for more information.

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 at stl/inc/memory_resource around the linked location and review the declaration of null_memory_resource and its current linkage. Check the vNext branch when it becomes available, then verify that the declaration uses the required C++ linkage while addressing the stated binary-compatibility constraint. There is no test or runnable entry point named in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.