Thanks to visit codestin.com
Credit goes to github.com

Skip to content

<vector>: Annotate vector for use with ASan #2030

@cbezault

Description

@cbezault

ASan can be taught to understand the concept of an access to a contiguous container that is in a valid region of memory but not in a valid region of the container.

e.g.

std::vector<int> v;
v.push_back(1);
v.pop_back();
*v.data() = 1;

would not result in an ASan exception as things stand. However, we can add annotations to the ASan shadow memory using __sanitizer_annotate_contiguous_container which will allow ASan to detect the invalid access.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ASanAddress SanitizerenhancementSomething can be improvedfixedSomething works now, yay!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions