Sending malformed grammar crashes the server example.
For instance, sending
curl --location 'localhost:8080/completion' \
--header 'Content-Type: application/json' \
--data '{
"grammar": "Root ::= [^\n]+ \"\n#\""
}'
to the server (built using make server and run via ./server -m <model>) will crash the server with the following exception:
libc++abi: terminating due to uncaught exception of type std::out_of_range: map::at: key not found. The r in root was capitalized, which is the source of the bad grammar.
Tested on an M1 Max Mac using commit 238657d.
Sending malformed grammar crashes the server example.
For instance, sending
to the server (built using
make serverand run via./server -m <model>) will crash the server with the following exception:libc++abi: terminating due to uncaught exception of type std::out_of_range: map::at: key not found. Therin root was capitalized, which is the source of the bad grammar.Tested on an M1 Max Mac using commit 238657d.