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

Crash on RFC7644 filter grammar #16

Open
tanguilp opened this issue Feb 16, 2019 · 1 comment
Open

Crash on RFC7644 filter grammar #16

tanguilp opened this issue Feb 16, 2019 · 1 comment

Comments

@tanguilp
Copy link

tanguilp commented Feb 16, 2019

Hi,

I've tried to use the grammar at https://tools.ietf.org/html/rfc7644#section-3.4.2.2 with ex_abnf parser.
Here is the file: filter.txt

Had to add a few definitions from other specs (like ALPHA and DIGIT at the bottom).

Here are the last commands before the crash:

iex(4)> grammar = ABNF.load_file("priv/filter.abnf")                     
%{
...}
iex(5)> initial_state = %{}                                              
%{}
iex(6)> ABNF.apply(grammar, "FILTER", "userName sw \"J\"", initial_state)
eheap_alloc: Cannot allocate 1318267840 bytes of memory (of type "heap").

Crash dump is being written to: erl_crash.dump...done

Seems similar to an infinite loop?

@tanguilp
Copy link
Author

It seems that infinite recursion was allowed in the original document - corrected here: https://www.rfc-editor.org/errata/eid4690

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

1 participant