Skip to content

fix: ICE when parsing unterminated raw byte strings#3812

Merged
CohenArthur merged 1 commit into
Rust-GCC:masterfrom
vishruth-thimmaiah:fix_raw_bytes
Jun 9, 2025
Merged

fix: ICE when parsing unterminated raw byte strings#3812
CohenArthur merged 1 commit into
Rust-GCC:masterfrom
vishruth-thimmaiah:fix_raw_bytes

Conversation

@vishruth-thimmaiah

@vishruth-thimmaiah vishruth-thimmaiah commented Jun 7, 2025

Copy link
Copy Markdown
Contributor

Fixes an ICE when a raw byte string is not terminated

Fixes #3731

gcc/rust/ChangeLog:

* lex/rust-lex.cc (Lexer::parse_raw_byte_string): Fix infinite looping when a raw byte string is not terminated.

gcc/testsuite/ChangeLog:

* rust/compile/torture/unended-raw-byte-string.rs: New test to ensure correct error message for unended raw byte string.

Fixes an ICE when a raw byte string is not terminated

Fixes Rust-GCC#3731

gcc/rust/ChangeLog:

	* lex/rust-lex.cc (Lexer::parse_raw_byte_string):
	Fix infinite looping when a raw byte string is not terminated.

gcc/testsuite/ChangeLog:

	* rust/compile/torture/unended-raw-byte-string.rs:
	New test to ensure correct error message for unended raw byte string.

Signed-off-by: Vishruth Thimmaiah <vishruththimmaiah@gmail.com>

@CohenArthur CohenArthur left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great, thank you for your work!! well done!

@CohenArthur CohenArthur added this pull request to the merge queue Jun 9, 2025
Merged via the queue into Rust-GCC:master with commit ac614b0 Jun 9, 2025
12 checks passed
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.

GCCRS fails to report unterminated raw byte string and produces incorrect errors

2 participants