Skip to content

Instantly share code, notes, and snippets.

@cygri
Created May 2, 2019 12:59
Show Gist options
  • Save cygri/aebba3c6f6e4ecfc00d58d2b4005146c to your computer and use it in GitHub Desktop.
Save cygri/aebba3c6f6e4ecfc00d58d2b4005146c to your computer and use it in GitHub Desktop.
A collection of bugs found in the Rasqal SPARQL query engine, part of librdf.

Rasqal bugs

The librdf issue tracker does not appear to allow bug submissions from the public, so I'm collecting some here.

VALUES one-variable form returns only first value

$ roqet -e 'SELECT * { VALUES ?i { 1 2 3 } }'

Expected:

?i
1
2
3

Actual:

roqet: Running query 'SELECT * { VALUES ?i { 1 2 3 } }'
roqet: Query has a variable bindings result
row: [i=string("1"^^<http://www.w3.org/2001/XMLSchema#integer>)]
roqet: Query returned 1 results

The problem is specific to the special one-variable syntax of VALUES. Rewritten like this it works fine:

VALUES (?i) { (1) (2) (3) }

VALUES zero-variable form segfaults

$ roqet -e 'SELECT * { VALUES () { () () } }'

Result:

Segmentation fault: 11

Invalid string escapes are accepted

$ roqet -e 'SELECT ("\a" AS ?x) {}'

Expected: Syntax error, \a is not a valid string escape and not allowed by the grammar

Actual:

roqet: Query has a variable bindings result
row: [x=string("a")]
roqet: Query returned 1 results
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment