microsoft / microsoft/mimalloc

Function erroneously declared as noexcept?

Open
#599 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
13.4k
Forks
1.2k
Avg merge
4d 45m
Merged PRs (30d)
13

Description

https://github.com/microsoft/mimalloc/blob/f2712f4a8f038a7fb4df2790f4c3b7e3ed9e219b/include/mimalloc.h#L438

It is highly discouraged, but destructors declared as noexcept(false) may throw.
Users would expect this function to be equivalent to calling the destructor, so they would be surprised if the program just terminates when the destructor throws.

Contributor guide

No contributing guide indexed for this repository

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 the declaration linked in include/mimalloc.h around line 438 and inspect why the function is marked noexcept. Check how it behaves with a destructor declared noexcept(false), then add or update coverage for the expected destructor-equivalent behavior and run the relevant test suite.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.