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

Unexpected exception #150

Open
mschwager opened this issue Mar 25, 2024 · 1 comment
Open

Unexpected exception #150

mschwager opened this issue Mar 25, 2024 · 1 comment

Comments

@mschwager
Copy link

Hi there,

I've been working on a new fuzzer for Ruby, and I used your library as a test harness. I was able to produce an "unexpected" exception. In this situation, I consider "unexpected" to be parsing exceptions that don't produce a TomlRB::* exception.

So far, I've been able to produce one of these exceptions:

Running: crash-de5bd93bdf57a240c692061f4c248221bc118965
/var/lib/gems/3.1.0/gems/citrus-3.0.2/lib/citrus.rb:890:in `scan': incompatible encoding regexp match (UTF-8 regexp with ASCII-8BIT string) (Encoding::CompatibilityError)
	from /var/lib/gems/3.1.0/gems/citrus-3.0.2/lib/citrus.rb:890:in `exec'
	from /var/lib/gems/3.1.0/gems/citrus-3.0.2/lib/citrus.rb:288:in `apply_rule'
	from /var/lib/gems/3.1.0/gems/citrus-3.0.2/lib/citrus.rb:250:in `exec'
	from /var/lib/gems/3.1.0/gems/citrus-3.0.2/lib/citrus.rb:1087:in `exec'
	from /var/lib/gems/3.1.0/gems/citrus-3.0.2/lib/citrus.rb:288:in `apply_rule'
	from /var/lib/gems/3.1.0/gems/citrus-3.0.2/lib/citrus.rb:250:in `exec'
	from /var/lib/gems/3.1.0/gems/citrus-3.0.2/lib/citrus.rb:1149:in `exec'
	from /var/lib/gems/3.1.0/gems/citrus-3.0.2/lib/citrus.rb:288:in `apply_rule'
	from /var/lib/gems/3.1.0/gems/citrus-3.0.2/lib/citrus.rb:250:in `exec'
	from /var/lib/gems/3.1.0/gems/citrus-3.0.2/lib/citrus.rb:1206:in `exec'
	from /var/lib/gems/3.1.0/gems/citrus-3.0.2/lib/citrus.rb:288:in `apply_rule'
	from /var/lib/gems/3.1.0/gems/citrus-3.0.2/lib/citrus.rb:250:in `exec'
	from /var/lib/gems/3.1.0/gems/citrus-3.0.2/lib/citrus.rb:780:in `exec'
	from /var/lib/gems/3.1.0/gems/citrus-3.0.2/lib/citrus.rb:288:in `apply_rule'
	from /var/lib/gems/3.1.0/gems/citrus-3.0.2/lib/citrus.rb:250:in `exec'
	from /var/lib/gems/3.1.0/gems/citrus-3.0.2/lib/citrus.rb:1244:in `exec'
	from /var/lib/gems/3.1.0/gems/citrus-3.0.2/lib/citrus.rb:288:in `apply_rule'
	from /var/lib/gems/3.1.0/gems/citrus-3.0.2/lib/citrus.rb:250:in `exec'
	from /var/lib/gems/3.1.0/gems/citrus-3.0.2/lib/citrus.rb:1149:in `exec'
	from /var/lib/gems/3.1.0/gems/citrus-3.0.2/lib/citrus.rb:288:in `apply_rule'
	from /var/lib/gems/3.1.0/gems/citrus-3.0.2/lib/citrus.rb:250:in `exec'
	from /var/lib/gems/3.1.0/gems/citrus-3.0.2/lib/citrus.rb:665:in `parse'
	from /var/lib/gems/3.1.0/gems/citrus-3.0.2/lib/citrus.rb:392:in `parse'
	from /var/lib/gems/3.1.0/gems/toml-rb-3.0.1/lib/toml-rb/parser.rb:13:in `initialize'
	from /var/lib/gems/3.1.0/gems/toml-rb-3.0.1/lib/toml-rb.rb:47:in `new'
	from /var/lib/gems/3.1.0/gems/toml-rb-3.0.1/lib/toml-rb.rb:47:in `parse'

Reproducer: crash-de5bd93bdf57a240c692061f4c248221bc118965.txt

This exception occur when running TomlRB.parse(data) against the data in the reproducer file.

@emancu
Copy link
Owner

emancu commented Sep 10, 2024

Thanks for reporting, I will take a look over next week

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

No branches or pull requests

2 participants