historical/m0-applesillicon.git/xnu-qemu-arm64-5.1.0/scripts/coccinelle/overflow_muldiv64.cocci

17 lines
283 B
Text
Raw Normal View History

2024-01-16 17:20:27 +00:00
// Find muldiv64(i64, i64, x) for potential overflow
@filter@
typedef uint64_t;
typedef int64_t;
{ uint64_t, int64_t, long, unsigned long } a, b;
expression c;
position p;
@@
muldiv64(a,b,c)@p
@script:python@
p << filter.p;
@@
cocci.print_main("potential muldiv64() overflow", p)