Skip to content

Conversation

@krisselden
Copy link
Contributor

Sanitize ':' in names as well as '-'.

Just emit a call to abort when visiting host ops instead of aborting.

@kripken
Copy link
Member

kripken commented Dec 15, 2017

Thanks!

Can you add a test for these? You can add a X.wast and X.2asm.js (the expected output) in test/.

@krisselden
Copy link
Contributor Author

@kripken so name can have more symbols than just '-' or ':' I was motivated because rust was emitting names with ':' but should I sanitize all of these?

let symbol = ['+''-''*''/''\\''^''~''=''<''>''!''?''@''#''$''%''&''|'':''`''.''\'']
let name = '$' (letter | digit | '_' | symbol)+

@kripken
Copy link
Member

kripken commented Dec 18, 2017

Yeah, in general, anything not valid as JS should be sanitized. We should also eventually add a conflict checking system, so two things don't get sanitized to the same output.

@froydnj
Copy link
Contributor

froydnj commented Feb 14, 2018

@krisselden Do you have plans to finish this up?

@krisselden
Copy link
Contributor Author

@froydnj this was superseded by

#1340 which handled grow_memory and export memory
#1433 which handled name mangling

@krisselden krisselden closed this Mar 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants