Skip to content

Fix a infinite recursion bug in NaryNode JIT Node #3072

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

Merged
merged 5 commits into from
Feb 22, 2021

Conversation

9prady9
Copy link
Member

@9prady9 9prady9 commented Dec 30, 2020

Description

When the maximum JIT tree height is two, createNaryNode goes into
infinite recursion due to missing base case check inside the function.
Fixes: #3065

Changes to Users

Fixes the infinite recursion bug when maximum jit length is set to 2.

Checklist

  • Rebased on latest master
  • Code compiles
  • Tests pass
  • [ ] Functions added to unified API
  • [ ] Functions documented

@9prady9 9prady9 added the fix label Dec 30, 2020
@9prady9 9prady9 added this to the 3.8.1 milestone Dec 30, 2020
@9prady9 9prady9 requested a review from umar456 December 30, 2020 05:27
@9prady9
Copy link
Member Author

9prady9 commented Jan 4, 2021

I think the clang-format error should be fixed once related fix from #3071 is merged. Locally I have made sure the formatting is good.

When the maximum JIT tree height is one, createNaryNode goes into
infinite recursion. This effects CUDA and OpenCL backends
@9prady9 9prady9 force-pushed the issue3065 branch 4 times, most recently from 5e96383 to 7ce4e6e Compare February 18, 2021 19:31
These functions are not exposed to users. They are not included when
generating installers. These functions are purely for testing certain
internal behavior given a certain combination of environment variables.

Test for unit max JIT height infinite recursion bug
unmarked CUDA_VERSION as advanced so that users may see what CUDA
toolkit is picked up
@9prady9 9prady9 merged commit e50c3a8 into arrayfire:master Feb 22, 2021
@9prady9 9prady9 deleted the issue3065 branch February 22, 2021 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Setting AF_CUDA_MAX_JIT_LEN to values < 2 produces SIGSEGV
2 participants