microsoft / microsoft/STL

`<forward_list>`, `<string>`, `<vector>`: Debug mode STL causes `terminate()` to be called under low memory

Open
#1,035 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
std::basic_string, std::vector default constructor is noexcept, which corresponds to the standard, but it allocates during construction, and thus may throw

Command-line test case
9525-ms-bug-repros.zip

STL version

Microsoft Visual Studio Professional 2019 Preview
Version 16.7.0 Preview 3.1

Additional context
Also tracked by DevCom-77779 and VSO-466800 / AB#466800

Similar issue is also tracked by Also tracked by DevCom-246249 and VSO-470756 / AB#470756

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 with the attached 9525-ms-bug-repros.zip command-line test case and the behavior of the <forward_list>, , and implementations in Debug mode. Reproduce the low-memory scenario and trace the default constructors; done means the reported terminate() behavior is addressed without violating the stated noexcept requirements.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.