-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Closed
Labels
Description
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.
ibehnam and bary12