Yingchi Long
ddf85b92aa
[BPF] improve error handling by custom lowering & fail() ( #75088 )
...
Currently on mcpu=v3 we do not support sdiv, srem instructions. And the
backend crashes with stacktrace & coredump, which is misleading for end
users, as this is not a "bug"
Add llvm bug reporting for sdiv/srem on ISel legalize-op phase.
For clang frontend we can get detailed location & bug report.
$ build/bin/clang -g -target bpf -c local/sdiv.c
local/sdiv.c:1:35: error: unsupported signed division, please convert to
unsigned div/mod.
1 | int sdiv(int a, int b) { return a / b; }
| ^
1 error generated.
Fixes : #70433
Fixes : #48647
This also improves error handling for dynamic stack allocation:
local/vla.c:2:3: error: unsupported dynamic stack allocation
2 | int b[n];
| ^
1 error generated.
Fixes: https://github.com/llvm/llvm-project/issues/57171
2023-12-13 13:41:52 +08:00
..
2023-11-03 12:52:16 -07:00
2023-10-26 12:07:37 -07:00
2023-12-12 16:19:34 +08:00
2023-12-05 19:21:42 +02:00
2023-07-26 08:37:30 -07:00
2023-04-05 00:55:32 +03:00
2022-12-19 12:46:54 +01:00
2022-12-19 12:46:54 +01:00
2022-12-19 12:46:54 +01:00
2023-07-26 08:37:30 -07:00
2022-12-19 12:46:54 +01:00
2022-12-19 12:46:54 +01:00
2022-12-19 12:46:54 +01:00
2022-12-19 12:46:54 +01:00
2018-04-03 03:56:37 +00:00
2023-04-17 20:08:45 +03:00
2022-12-19 12:46:54 +01:00
2023-12-13 13:41:52 +08:00
2023-09-11 14:42:37 -07:00
2022-09-24 18:53:59 +01:00
2023-07-26 08:37:30 -07:00
2022-12-19 12:46:54 +01:00
2022-12-19 12:46:54 +01:00
2022-12-19 12:46:54 +01:00
2021-05-16 11:01:47 -07:00
2023-07-26 08:37:30 -07:00
2023-05-17 17:03:15 +02:00
2022-12-19 12:46:54 +01:00
2023-11-07 07:25:47 -08:00
2022-12-19 12:46:54 +01:00
2023-08-01 11:12:43 +09:00
2023-08-01 00:31:12 +03:00
2022-12-19 12:46:54 +01:00
2022-12-19 12:46:54 +01:00
2022-12-19 12:46:54 +01:00
2023-07-26 08:37:30 -07:00
2023-06-27 01:15:45 +03:00
2023-09-11 14:42:37 -07:00
2023-09-11 14:42:37 -07:00
2023-09-11 14:42:37 -07:00
2023-09-11 14:42:37 -07:00
2023-09-11 14:42:37 -07:00
2023-09-11 14:42:37 -07:00
2023-09-11 14:42:37 -07:00
2023-09-11 14:42:37 -07:00
2023-09-11 14:42:37 -07:00
2023-09-11 14:42:37 -07:00
2023-09-11 14:42:37 -07:00
2022-12-19 12:46:54 +01:00
2020-11-16 07:08:41 -08:00
2023-02-09 18:45:20 +03:00
2023-09-11 14:42:37 -07:00
2023-09-11 14:42:37 -07:00
2023-09-11 14:42:37 -07:00
2023-09-11 14:42:37 -07:00
2023-09-11 14:42:37 -07:00
2022-12-19 12:46:54 +01:00
2022-12-19 12:46:54 +01:00
2018-02-18 10:09:54 +00:00
2022-12-19 12:46:54 +01:00
2022-12-19 12:46:54 +01:00
2022-12-19 12:46:54 +01:00
2022-12-19 12:46:54 +01:00
2022-12-19 12:46:54 +01:00
2023-08-22 00:04:51 +03:00
2022-12-19 12:46:54 +01:00
2022-12-19 12:46:54 +01:00
2022-12-19 12:46:54 +01:00
2022-12-19 12:46:54 +01:00
2022-12-19 12:46:54 +01:00
2022-12-19 12:46:54 +01:00
2022-12-19 12:46:54 +01:00
2022-12-19 12:46:54 +01:00
2023-12-13 13:41:52 +08:00
2023-07-26 08:37:30 -07:00
2022-12-19 12:46:54 +01:00
2022-12-19 12:46:54 +01:00
2017-08-23 04:25:57 +00:00
2022-12-22 12:58:53 +01:00
2023-07-11 22:30:34 +03:00
2023-04-11 11:11:30 +01:00
2023-12-13 13:41:52 +08:00
2023-08-16 17:51:28 +03:00
2023-08-01 00:31:12 +03:00
2016-05-30 08:28:34 +00:00
2022-08-18 19:11:50 -07:00
2022-08-18 19:11:50 -07:00
2023-02-09 18:45:20 +03:00
2023-08-01 00:31:12 +03:00
2023-06-24 22:44:06 -07:00
2022-12-19 12:46:54 +01:00
2023-10-16 12:17:24 +02:00
2022-05-30 19:19:23 +01:00