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 logs are returned with the trailing nul as a a valid character #539

Closed
eyalroz opened this issue Aug 1, 2023 · 0 comments
Closed

Comments

@eyalroz
Copy link
Owner

eyalroz commented Aug 1, 2023

These functions:

template <source_kind_t Kind>
span<char> compilation_output_base_t<Kind>::log(span<char> buffer) const

currently return a size field in the output span which includes the trailing \0 (nul) character. Let's not do that.

See relevant API documentation here

@eyalroz eyalroz added the bug label Aug 1, 2023
@eyalroz eyalroz self-assigned this Aug 1, 2023
eyalroz pushed a commit that referenced this issue Aug 8, 2023
The NVRTC log size includes the trailing nul ('\0') characer, but the
PTX log doesn't; so, making the distinction in the code obtaining each
of them
eyalroz added a commit that referenced this issue Oct 3, 2023
* Not trying to make an actual retrieval API call for a size-0 buffer/string (or size-1 compilation log, since it's just the trailing '\0')
* Ensuring our buffer for the compilation log accommodates the trailing '\0'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant