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
Map sample in ebpf-for-windows triggers "CRAB error : Integer overflow during addition" during verification #427
Comments
Here are two sample programs, one working the other not working. The only difference is this line of code:
Which expands to:
Which then produces something like this:
The large integers appear to cause crab to trigger an integer overflow. |
It happened to me when I first worked on the project in VMware, and I fixed it using arbitrary threshold for integer constants above which I widened to TOP. I did not keep the tests for technical reasons and apparently at some point the fix had been removed. |
I think what saved this previously is that it always cast immediate values to int, truncating them to 32bit whereas the code now maintains the full fidelity. |
Maybe that too. I believe we are talking about very different points in time. |
After updating to commit id 012f13f ebpf-for-windows fails during building the map BPF program sample.
Failing BPF program is compiled from this source:
https://github.com/microsoft/ebpf-for-windows/blob/main/tests/sample/map.c
The text was updated successfully, but these errors were encountered: