Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pop_back function for vector on CppRuntime_Clang #16

Open
wants to merge 1 commit into
base: v1.x.x
Choose a base branch
from

Conversation

Emmankoko
Copy link
Collaborator

With functions like pop_back and push_back, there have been recent ASAN(address sanitization) annotations that have been added to check for some memory poisoning with the unsafe usage of unused capacity since reallocations can produce larger capacity than the number of elements in the container so there will be few unused memory that will not be safe to use. I looked through it, and It is whole poisoning runtime library not part of the STL.

I think now that we have pop_back working, there's a Todo comment left in pop_back function which I think will be good for us to integrate that as a future work.

can check it out here:
PATCH
Library

@Emmankoko Emmankoko force-pushed the Mvecctor/pop_back branch 2 times, most recently from 5895ae5 to b3828ba Compare February 17, 2024 16:13
Comment on lines 915 to 916
pointer __begin_ = null;
pointer __end_ = null;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pointer __begin_ = null;
pointer __end_ = null;
pointer __begin_;
pointer __end_;

null is the default for pointers in D.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yess, true... let me make that alterations

@Geod24
Copy link
Member

Geod24 commented Feb 19, 2024

I'm not familiar with ASAN annotation, anything I can read on ?

@Emmankoko
Copy link
Collaborator Author

I'm not familiar with ASAN annotation, anything I can read on ?

Look at PATCH and LIBRARY at the end of my comment

@Emmankoko Emmankoko force-pushed the Mvecctor/pop_back branch 3 times, most recently from e338d6f to 21a5353 Compare February 22, 2024 04:32
@Geod24 Geod24 force-pushed the Mvecctor/pop_back branch from 21a5353 to bb6f683 Compare June 18, 2024 14:25
@Geod24 Geod24 enabled auto-merge (rebase) June 18, 2024 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants