-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[BUG] Strange segmentation fault when printing a tensor #2666
Comments
ltjkoomen
added
bug
Something isn't working
mojo-repo
Tag all issues with this label
labels
May 15, 2024
Error that is visible is:
|
Reduced testcase
out of bounds error? |
Your reduced testcase does not cause a segmentation fault on my system though. Also, the printing of the matrix and the redundant reading of the empty file are both required to cause the segfault, so I don't think this is simply an out-of-bounds error. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug description
This is a strange one. I get a segmentation fault when trying to print the result of indexing a tensor without providing an index. However, this segfault is dependent on some other stuff in the code being present. For more details see the minimal example.
Steps to reproduce
Include relevant code snippet or link to code that did not work as expected.
I've come to the following minimal example of the issue:
Additional requirements:
Strangely, the segfault seems to be dependent on:
range(matrix.shape()[0]
instead of justrange(1)
matrix[]
. Not sure what this is supposed to return normally, but normally this does not segfault and printsTrue
. Also, printingmatrix[0]
does not segfault.bool
orint8
, any other type seems to work fineIf applicable, add screenshots to help explain the problem.
Not applicable.
If using the Playground, name the pre-existing notebook that failed and the steps that led to failure.
Not applicable.
Include anything else that might help us debug the issue.
I get the following stack dump:
System information
The text was updated successfully, but these errors were encountered: