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

Compilation error triggers segmentation fault #6362

Closed
strongoier opened this issue Oct 18, 2022 · 2 comments
Closed

Compilation error triggers segmentation fault #6362

strongoier opened this issue Oct 18, 2022 · 2 comments
Labels
potential bug Something that looks like a bug but not yet confirmed
Milestone

Comments

@strongoier
Copy link
Contributor

A compilation error in a simple Taichi kernel triggers segmentation fault.

For the following script,

@ti.kernel
def foo():
    a

Expected result:

Traceback (most recent call last):
  File "test_slice.py", line 16, in <module>
    foo1()
  File "/home/xuyi15/taichi/python/taichi/lang/kernel_impl.py", line 932, in wrapped
    raise type(e)('\n' + str(e)) from None
taichi.lang.exception.TaichiNameError: 
File "test_slice.py", line 14, in foo1:
    a
    ^
Name "a" is not defined

Result on my environment (clang-8++):

free(): double free detected in tcache 2
Segmentation fault (core dumped)

The problem appears after #6335. Changing the compiler from clang-8++ to clang-10++ or clang-12++ solves the problem.

@strongoier strongoier added the potential bug Something that looks like a bug but not yet confirmed label Oct 18, 2022
@taichi-gardener taichi-gardener moved this to Untriaged in Taichi Lang Oct 18, 2022
strongoier added a commit to strongoier/taichi that referenced this issue Oct 18, 2022
@strongoier
Copy link
Contributor Author

strongoier commented Oct 18, 2022

#6363 provides a temporary fix but the root cause hasn't been understood yet.

@strongoier strongoier added this to the v1.1.4 milestone Oct 18, 2022
@jim19930609 jim19930609 modified the milestones: v1.1.4, v1.2.0 Oct 18, 2022
strongoier added a commit that referenced this issue Oct 19, 2022
@strongoier
Copy link
Contributor Author

I'll close this issue for now as the fix has been merged. Feel free to reopen this if other issues related to this appear.

Repository owner moved this from Untriaged to Done in Taichi Lang Oct 19, 2022
jim19930609 pushed a commit to jim19930609/taichi that referenced this issue Oct 19, 2022
jim19930609 added a commit that referenced this issue Oct 19, 2022
Issue: #6362

Issue: #

### Brief Summary

Co-authored-by: Yi Xu <xy_xuyi@foxmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
potential bug Something that looks like a bug but not yet confirmed
Projects
Status: Done
Development

No branches or pull requests

2 participants