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

[TIR] Add pass to check for out of bounds memory access #12352

Merged
merged 5 commits into from
Aug 22, 2022

Conversation

tkonolige
Copy link
Contributor

@tkonolige tkonolige commented Aug 9, 2022

This is a conservative static analysis that checks to see if any out of bounds array access occurs. It is not enabled by default.

@Lunderberg @AndrewZhaoLuo @jwfromm

cc @gigiblender

tkonolige and others added 3 commits August 9, 2022 14:16
This is a conservative static analysis that checks to see if any out of
bounds array access occurs. It is not enabled by default.
@AndrewZhaoLuo
Copy link
Contributor

I'll take a look over the weekend

Copy link
Contributor

@Lunderberg Lunderberg left a comment

Choose a reason for hiding this comment

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

LGTM!

String DetailRenderTemplate() const final {
std::stringstream s;
for (const auto& oob : locations_) {
s << "Out of bounds memory access on buffer " << oob.buf->name << " dimension "
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: It might be nice to have a test where you show the full rendered strings.

@AndrewZhaoLuo AndrewZhaoLuo merged commit 1e399fa into apache:main Aug 22, 2022
xinetzone pushed a commit to daobook/tvm that referenced this pull request Nov 25, 2022
* [TIR] Add pass to check for out of bounds memory access

This is a conservative static analysis that checks to see if any out of
bounds array access occurs. It is not enabled by default.

* formatting

* manually construct local irmodule

* update comment

* fix bug in int_set
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.

3 participants