microsoft / microsoft/STL

`<vector>`: Consider renaming `_Asan_extend_guard`/`_ASAN_VECTOR_EXTEND_GUARD`

Open
#4,115 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

https://github.com/microsoft/STL/pull/2420#issuecomment-994223180

I think we should consider renaming _Asan_extend_guard/_ASAN_VECTOR_EXTEND_GUARD since the "absolute size" usage is not obvious, especially when _Modify_annotation/_ASAN_VECTOR_MODIFY takes a relative size.

https://github.com/microsoft/STL/pull/2420#issuecomment-994249028

I totally agree. I think I named it extend guard because I had gotten mixed up between refactors whether it took a new absolute size or a delta, which is exactly the same refactor that missed these three call sites.

I don't immediately know what a good name would be, hence this followup issue.

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 implementation and the _Asan_extend_guard and _ASAN_VECTOR_EXTEND_GUARD definitions and call sites mentioned in the issue. Review how their absolute-size usage differs from _Modify_annotation and _ASAN_VECTOR_MODIFY, then agree on a clearer replacement name and update all affected references consistently.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.