Skip to content

Conversation

@lukaszsamson
Copy link
Contributor

I noticed this crash

** (MatchError) no match of right hand side value: {:error, {[line: 1, column: 22], ~c"invalid Unicode escape character, expected \\uHHHH or \\u{H*} where H is a hexadecimal digit. Syntax error after: ", ~c"\\u"}}
    (elixir 1.18.4) src/elixir_tokenizer.erl:929: :elixir_tokenizer.handle_dot/6

All other usages of unescape_tokens properly handle errors

@josevalim
Copy link
Member

Do you know which input can trigger this? If not, I can reverse engineer a test. :)

@lukaszsamson
Copy link
Contributor Author

Do you know which input can trigger this? If not, I can reverse engineer a test. :)

46.y .'9VQj}.{k*J\%yDHqULDXI!g5V"!qJWhV|U%"XJN\xgy(<=&|6^GDk.ui+zOO}\,mZ5QA%T]'BUP@Q}8:-yRNL7C\gG'

@josevalim
Copy link
Member

If you can push a test with a minimum string, that would be fantastic, otherwise I will do it later, thanks!

@sabiwara
Copy link
Contributor

sabiwara commented Jun 18, 2025

I think I got a minimum string:

iex> Code.string_to_quoted "a.'\\u'"
** (MatchError) no match of right hand side value: {:error, {[line: 1, column: 3], ~c"invalid Unicode escape character, expected \\uHHHH or \\u{H*} where H is a hexadecimal digit. Syntax error after: ", ~c"\\u"}}
    (elixir 1.18.4) src/elixir_tokenizer.erl:929: :elixir_tokenizer.handle_dot/6

@josevalim josevalim merged commit b2587e8 into elixir-lang:main Jun 19, 2025
13 checks passed
@josevalim
Copy link
Member

💚 💙 💜 💛 ❤️

ggVGc pushed a commit to ggVGc/elixir-verbatim that referenced this pull request Sep 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants