Skip to contentSkip to conversation

coccinelle: misc: add array_size_dup script to detect missed overflow checks

PATCH Markus Elfring 2 participants 3 messages Jun 23, 2020 Kernel janitors

lore
Share & tools
lore
#0 lore raw
Quoted 1 line

Changes in v2:

…

Quoted 1 line

- assignment operator used

I prefer the distinction for the application of corresponding metavariables.

Quoted 1 line

Changes in v3:

…

Quoted 1 line

- \(&E1\|&E2\) changed to &\(E1\|E2\)

Would it be more helpful to mention the movement of the ampersand before SmPL disjunctions?

…

Quoted 1 line

+/// Three types of patterns for these functions:

Will another adjustment be needed according to your information “duplicates warning removed”?

…

Review

Quoted 3 lines
(quoted diff) +3 -0
+virtual context
+virtual report
+virtual org

Can the following SmPL code variant ever become more attractive?

+virtual context, report, org

…

Review

Quoted 3 lines
(quoted diff) +3 -0
+expression subE1 <= as.E1;
+expression subE2 <= as.E2;
+expression as.E1, as.E2, E3;

How do you think about the following SmPL code variant?

+expression subE1 <= as.E1,
+ subE2 <= as.E2,
+ as.E1, as.E2, E3;

…

Review

Quoted 2 lines
(quoted diff) +2 -0
+msg = "WARNING: array_size is used later (line %s) to compute the same size" % (p2[0].line)
+coccilib.report.print_report(p1[0], msg)

Please omit the extra Python variable “msg” for the passing of such simple message objects.

What does hinder you to take the proposed script variants better into account?

Regards,
Markus

#1 lore raw

I don't agree with any of these comments.

julia

Quoted 54 lines · Markus Elfring
Quoted 1 line

Changes in v2:

…

Quoted 1 line

- assignment operator used

I prefer the distinction for the application of corresponding metavariables.

Quoted 1 line

Changes in v3:

…

Quoted 1 line

- \(&E1\|&E2\) changed to &\(E1\|E2\)

Would it be more helpful to mention the movement of the ampersand before SmPL disjunctions?

…

Quoted 1 line

+/// Three types of patterns for these functions:

Will another adjustment be needed according to your information “duplicates warning removed”?

…

Review

Quoted 3 lines
(quoted diff) +3 -0
+virtual context
+virtual report
+virtual org

Can the following SmPL code variant ever become more attractive?

+virtual context, report, org

…

Review

Quoted 3 lines
(quoted diff) +3 -0
+expression subE1 <= as.E1;
+expression subE2 <= as.E2;
+expression as.E1, as.E2, E3;

How do you think about the following SmPL code variant?

(quoted diff) +3 -0
+expression subE1 <= as.E1,
+           subE2 <= as.E2,
+           as.E1, as.E2, E3;
 
 
…

Review

Quoted 2 lines
(quoted diff) +2 -0
+msg = "WARNING: array_size is used later (line %s) to compute the same size" % (p2[0].line)
+coccilib.report.print_report(p1[0], msg)

Please omit the extra Python variable “msg” for the passing of such simple message objects.

What does hinder you to take the proposed script variants better into account?

Regards,
Markus

#2 lore raw
Quoted 1 line

I don't agree with any of these comments.

Would we like to clarify each of the disagreements in more detail for a more constructive patch review?

Regards,
Markus