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

[BUG] AF_JIT_KERNEL_TRACE with path fails on windows #3515

Open
errata-c opened this issue Oct 22, 2023 · 2 comments · May be fixed by #3517
Open

[BUG] AF_JIT_KERNEL_TRACE with path fails on windows #3515

errata-c opened this issue Oct 22, 2023 · 2 comments · May be fixed by #3517
Labels

Comments

@errata-c
Copy link

errata-c commented Oct 22, 2023

Setting environment variable AF_JIT_KERNEL_TRACE to an absolute path on windows fails. Using stdout and stderr both function as expected.

I've traced the issue back to src/backend/common/util.cpp, in the saveKernel function.

At line 128, the function call FILE* f = fopen(ffp.c_str(), "we"); uses 'e' in the mode string, which is a nonstandard extension provided by glibc 2.3+.
This causes the call to fail for the windows binary.
My installation of ArrayFire is the v3.9.0 release, installed with the provided installer at arrayfire.com.

The 'e' flag makes sure the file handle is released when one of the exec functions are called to replace the current process on Linux. This is unnecessary for windows as windows processes are not forked like in Linux.

@errata-c errata-c added the bug label Oct 22, 2023
@melonakos
Copy link
Member

Hey, thanks for submitting this issue. I think you're right about this. Would you like to make a pull request for this issue?

@errata-c errata-c linked a pull request Oct 26, 2023 that will close this issue
5 tasks
@errata-c
Copy link
Author

@melonakos I have submitted the PR for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants