You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/09/05 12:57:34 UTC

[GitHub] [tvm] syang-ng opened a new pull request #8930: [Bugfix] Add check to avoid calling back() on an empty container

syang-ng opened a new pull request #8930:
URL: https://github.com/apache/tvm/pull/8930


   This is related to an issue [here](https://discuss.tvm.apache.org/t/crash-triggered-by-8-lines-of-tir-code/10808/5). 
   
   In a word, function `PrimExpr VisitExpr_(const LoadNode* op)` forgets to check the size of the vector `scope_[op->buffer_var.get()]`, while calling std::vector::back on an empty container will cause undefined behavior. 
   
   This PR fixed this problem by adding the vector size check before calling `back()`.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] syang-ng commented on pull request #8930: [Bugfix] Add check to avoid calling back() on an empty container

Posted by GitBox <gi...@apache.org>.
syang-ng commented on pull request #8930:
URL: https://github.com/apache/tvm/pull/8930#issuecomment-913360600


   I add a test case to cover the problem in the new commit. Since there is no way to invoke this function directly, I  call the pass `tir.transform.InjectVirtualThread` to trigger this problem. Could you help review this PR :-D @vinx13 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] vinx13 merged pull request #8930: [Bugfix] Add check to avoid calling back() on an empty container

Posted by GitBox <gi...@apache.org>.
vinx13 merged pull request #8930:
URL: https://github.com/apache/tvm/pull/8930


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] vinx13 commented on pull request #8930: [Bugfix] Add check to avoid calling back() on an empty container

Posted by GitBox <gi...@apache.org>.
vinx13 commented on pull request #8930:
URL: https://github.com/apache/tvm/pull/8930#issuecomment-913698012


   please fix ci error


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] tqchen edited a comment on pull request #8930: [Bugfix] Add check to avoid calling back() on an empty container

Posted by GitBox <gi...@apache.org>.
tqchen edited a comment on pull request #8930:
URL: https://github.com/apache/tvm/pull/8930#issuecomment-913154710


   Thanks @syang-ng , can you add a regression unit test case to cover the problem(ideally not calling build but directly call the pass that invokes this function)?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] syang-ng commented on pull request #8930: [Bugfix] Add check to avoid calling back() on an empty container

Posted by GitBox <gi...@apache.org>.
syang-ng commented on pull request #8930:
URL: https://github.com/apache/tvm/pull/8930#issuecomment-914059159


   I updated the test case and it has passed all checks. Could you help to review it? Thanks :-P @vinx13 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] tqchen commented on pull request #8930: [Bugfix] Add check to avoid calling back() on an empty container

Posted by GitBox <gi...@apache.org>.
tqchen commented on pull request #8930:
URL: https://github.com/apache/tvm/pull/8930#issuecomment-913154710


   Thanks @syang-ng , can you add a regression test case?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] tqchen commented on pull request #8930: [Bugfix] Add check to avoid calling back() on an empty container

Posted by GitBox <gi...@apache.org>.
tqchen commented on pull request #8930:
URL: https://github.com/apache/tvm/pull/8930#issuecomment-913158068


   cc @ZihengJiang @vinx13 please help to manage the PR


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org