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

bpf-lua pipeline: division by a constant wrongly fails #204

Open
kbara opened this issue May 12, 2015 · 1 comment
Open

bpf-lua pipeline: division by a constant wrongly fails #204

kbara opened this issue May 12, 2015 · 1 comment

Comments

@kbara
Copy link
Contributor

kbara commented May 12, 2015

% ./pflua-pipelines-match ../tests/data/wingolog.pcap "10 / 5 > 0" 1
luajit: ../src/pf/bpf.lua:256: division by non-constant value is unsupported
stack traceback:
    [C]: in function 'assert'
    ../src/pf/bpf.lua:256: in function 'alu'
    ../src/pf/bpf.lua:327: in function 'compile_lua'
    ../src/pf/bpf.lua:444: in function 'compile_filter'
    ./pflua-pipelines-match:68: in function 'create_preds'
    ./pflua-pipelines-match:85: in function 'main_pflang'
    ./pflua-pipelines-match:168: in function 'run_filters'
    ./pflua-pipelines-match:172: in main chunk
    [C]: at 0x00404bc0

Needless to say, 5 is a constant, and this error should not be occurring.

@kbara
Copy link
Contributor Author

kbara commented May 12, 2015

This bug is specific to the non-optimized bpf-lua pipeline; with --force-opt, the problem does not show up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant