Project

General

Profile

Bug #1246

--filter expression parser accepts foo[bar]

Added by Simon Marchi 7 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
03/19/2020
Due date:
% Done:

0%

Estimated time:

Description

According to the doc, it is only possible to access arrays elements using positive literal integer numbers. However, the parser accepts:

./lttng enable-event -u -a --filter 'allo[toi] == 2'

Internally, create_load_expression creates a ir_load_expression_op node with type IR_LOAD_EXPRESSION_GET_INDEX. However, the associated index value is the value of the pointer to the toi string, interpreted as an unsigned integer by visit_node_load_expression when generating the bytecode.

I think this user error should be caught earlier and result in an error on the client side.

No data to display

Also available in: Atom PDF