Skip to content

parsing_cocci: Fix struct pointer funcall regression

Jaskaran Singh cocci linux-kernel-mentees 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2parsing_cocci: parse_cocci: Fix struct pointer funcall regressionparsing_cocci/parse_cocci.ml+1 -00 replies
2/2tests: Add test case for struct pointer function calltests/structptr_func.c tests/structptr_func.cocci tests/structptr_func.res+23 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Cocci] [PATCH 0/2] parsing_cocci: Fix struct pointer funcall regression

This series is a fix in response to the following bug report:

https://www.mail-archive.com/[email protected]/msg07332.html

The following commit:

	c280375635f62dfbe052709e4e47a82140d32ce5

Introduces a regression in the following SmPL use case:

	@@
	struct s *x;
	@@

	x->func();

Where x is a pointer to a struct and func is a function belonging to said struct. The faulty commit mislabels func as a function prototype due to a missing case in the function-prototype-detection match ladder.

Enclosed in this patch series is a fix for this and a corresponding test case.

Jaskaran Singh (2):
parsing_cocci: parse_cocci: Fix struct pointer funcall regression
tests: Add test case for struct pointer function call

 parsing_cocci/parse_cocci.ml |    1 +
 tests/structptr_func.c       |    5 +++++
 tests/structptr_func.cocci   |   12 ++++++++++++
 tests/structptr_func.res     |    6 ++++++
 4 files changed, 24 insertions(+)

_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees