Skip to content
This repository has been archived by the owner on Feb 9, 2020. It is now read-only.

Use '_' instead of '.' in symbol name sanitization #6

Merged
merged 1 commit into from
Aug 11, 2018
Merged

Conversation

termoshtt
Copy link
Collaborator

As commended in the rustc code:

Name sanitation. LLVM will happily accept identifiers with weird names, but gas doesn't!
gas accepts the following characters in symbols: a-z, A-Z, 0-9, ., _, $

rustc sanitizes symbol name for GAS output, but the rule of symbol names in PTX seems to be different from GAS especially around '.'. sanitize function in librustc_codegen_utils replace '-' and ':' into '.', but it causes problem as reported,
rust-lang#38789 (comment)
and this changes it to '_'.

@termoshtt termoshtt merged commit ec42ff6 into master Aug 11, 2018
@termoshtt termoshtt deleted the sanitize branch August 11, 2018 10:06
@termoshtt
Copy link
Collaborator Author

uploaded

@Jasper-Bekkers
Copy link

Should we try to upstream this change?

@termoshtt
Copy link
Collaborator Author

I will report these after I success to generate valid PTX, but it may worth reporting separately.

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

Successfully merging this pull request may close these issues.

2 participants