Re: Infinite loop in checkpatch.pl

From: Joe Perches
Date: Fri Mar 03 2023 - 12:03:13 EST


On Fri, 2023-03-03 at 15:28 +0100, Alexander Potapenko wrote:
> Hi folks,
>
> I've noticed that checkpatch.pl chokes on the following file (also attached):
>
> ==================================
> $ cat test-checkpatch.txt
> diff --git a/mm/kmsan/kmsan_test.c b/mm/kmsan/kmsan_test.c
> @@ -504,6 +504,25 @@ static void
> test_memcpy_aligned_to_unaligned2(struct kunit *test)
> + EXPECTATION_NO_REPORT(expect); \
> + volatile uint##size##_t uninit; \

checkpatch isn't a syntax complete c parser. Don't expect to be.