Coccinelle archive on lore.kernel.org
 help / color / Atom feed
* [Cocci] Regression since recent parentypes patches were merged
@ 2020-05-12 11:57 Christoph Böhmwalder
  2020-05-12 12:30 ` Julia Lawall
  2020-05-13  7:32 ` Jaskaran Singh
  0 siblings, 2 replies; 4+ messages in thread
From: Christoph Böhmwalder @ 2020-05-12 11:57 UTC (permalink / raw)
  To: Jaskaran Singh; +Cc: Coccinelle

Hi Jaskaran,
Hi all,

I have noticed a regression in spatch since the recent SmPL improvements 
were merged. Here is a small reproducer:

@@
struct socket *sock;
struct sockaddr *uaddr;
int peer;
@@
{
+int ___addr_len;
...
- sock->ops->getname(sock, uaddr, peer);
+ sock->ops->getname(sock, uaddr, &___addr_len, peer);
...
}


This used to parse just fine, however now it errors out:


$ spatch --parse-cocci compat.cocci
init_defs_builtins: /usr/local/bin/../lib/coccinelle/standard.h
minus: parse error:
   File "compat.cocci", line 9, column 13, charpos = 98
   around = 'getname',
   whole content = - sock->ops->getname(sock, uaddr, peer);


I have bisected the problem and it appears that the first bad commit is:

commit c280375635f62dfbe052709e4e47a82140d32ce5
Author: Jaskaran Singh <jaskaransingh7654321@gmail.com>
Date:   Fri Mar 20 12:31:32 2020 +0530

     Add parentypes to SmPL

     This allows the SmPL and C ASTs to better match up, which enables
     more transformations.  The patch is very large, so I have left
     the different messages as they were proposed in the original
     patch series.

Which is unfortunately huge, and since it was squashed together I really 
can't be any more specific.

Anyways, is this a bug? Or was I doing something wrong in the first place?

Thanks and best regards,
--
Christoph Böhmwalder
LINBIT | Keeping the Digital World Running
DRBD HA —  Disaster Recovery — Software defined Storage
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Cocci] Regression since recent parentypes patches were merged
  2020-05-12 11:57 [Cocci] Regression since recent parentypes patches were merged Christoph Böhmwalder
@ 2020-05-12 12:30 ` Julia Lawall
  2020-05-13  7:32 ` Jaskaran Singh
  1 sibling, 0 replies; 4+ messages in thread
From: Julia Lawall @ 2020-05-12 12:30 UTC (permalink / raw)
  To: Christoph Böhmwalder; +Cc: Coccinelle


[-- Attachment #1: Type: text/plain, Size: 1855 bytes --]



On Tue, 12 May 2020, Christoph Böhmwalder wrote:

> Hi Jaskaran,
> Hi all,
>
> I have noticed a regression in spatch since the recent SmPL improvements
> were merged. Here is a small reproducer:
>
> @@
> struct socket *sock;
> struct sockaddr *uaddr;
> int peer;
> @@
> {
> +int ___addr_len;
> ...
> - sock->ops->getname(sock, uaddr, peer);
> + sock->ops->getname(sock, uaddr, &___addr_len, peer);
> ...
> }
>
>
> This used to parse just fine, however now it errors out:
>
>
> $ spatch --parse-cocci compat.cocci
> init_defs_builtins: /usr/local/bin/../lib/coccinelle/standard.h
> minus: parse error:
>    File "compat.cocci", line 9, column 13, charpos = 98
>    around = 'getname',
>    whole content = - sock->ops->getname(sock, uaddr, peer);
>
>
> I have bisected the problem and it appears that the first bad commit is:
>
> commit c280375635f62dfbe052709e4e47a82140d32ce5
> Author: Jaskaran Singh <jaskaransingh7654321@gmail.com>
> Date:   Fri Mar 20 12:31:32 2020 +0530
>
>      Add parentypes to SmPL
>
>      This allows the SmPL and C ASTs to better match up, which enables
>      more transformations.  The patch is very large, so I have left
>      the different messages as they were proposed in the original
>      patch series.
>
> Which is unfortunately huge, and since it was squashed together I really
> can't be any more specific.

It's huge because any change to the AST affects everything...

>
> Anyways, is this a bug? Or was I doing something wrong in the first place?

It's surely a bug.  Thanks for the report.

julia

> Thanks and best regards,
> --
> Christoph Böhmwalder
> LINBIT | Keeping the Digital World Running
> DRBD HA —  Disaster Recovery — Software defined Storage
> _______________________________________________
> Cocci mailing list
> Cocci@systeme.lip6.fr
> https://systeme.lip6.fr/mailman/listinfo/cocci
>

[-- Attachment #2: Type: text/plain, Size: 136 bytes --]

_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Cocci] Regression since recent parentypes patches were merged
  2020-05-12 11:57 [Cocci] Regression since recent parentypes patches were merged Christoph Böhmwalder
  2020-05-12 12:30 ` Julia Lawall
@ 2020-05-13  7:32 ` Jaskaran Singh
  2020-05-13 11:13   ` Julia Lawall
  1 sibling, 1 reply; 4+ messages in thread
From: Jaskaran Singh @ 2020-05-13  7:32 UTC (permalink / raw)
  To: Christoph Böhmwalder; +Cc: Coccinelle

On Tue, 2020-05-12 at 13:57 +0200, Christoph Böhmwalder wrote:
> Hi Jaskaran,
> Hi all,
> 
> I have noticed a regression in spatch since the recent SmPL
> improvements 
> were merged. Here is a small reproducer:
> 
> @@
> struct socket *sock;
> struct sockaddr *uaddr;
> int peer;
> @@
> {
> +int ___addr_len;
> ...
> - sock->ops->getname(sock, uaddr, peer);
> + sock->ops->getname(sock, uaddr, &___addr_len, peer);
> ...
> }
> 
> 
> This used to parse just fine, however now it errors out:
> 
> 
> $ spatch --parse-cocci compat.cocci
> init_defs_builtins: /usr/local/bin/../lib/coccinelle/standard.h
> minus: parse error:
>    File "compat.cocci", line 9, column 13, charpos = 98
>    around = 'getname',
>    whole content = - sock->ops->getname(sock, uaddr, peer);
> 
> 
> I have bisected the problem and it appears that the first bad commit
> is:
> 
> commit c280375635f62dfbe052709e4e47a82140d32ce5
> Author: Jaskaran Singh <jaskaransingh7654321@gmail.com>
> Date:   Fri Mar 20 12:31:32 2020 +0530
> 
>      Add parentypes to SmPL
> 
>      This allows the SmPL and C ASTs to better match up, which
> enables
>      more transformations.  The patch is very large, so I have left
>      the different messages as they were proposed in the original
>      patch series.
> 
> Which is unfortunately huge, and since it was squashed together I
> really 
> can't be any more specific.
> 
> Anyways, is this a bug? Or was I doing something wrong in the first
> place?
> 

Hi Christoph,

I've sent a patch for this, it should be merged after review. Sorry for
the inconvenience!

Cheers,
Jaskaran.

> Thanks and best regards,
> --
> Christoph Böhmwalder
> LINBIT | Keeping the Digital World Running
> DRBD HA —  Disaster Recovery — Software defined Storage

_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Cocci] Regression since recent parentypes patches were merged
  2020-05-13  7:32 ` Jaskaran Singh
@ 2020-05-13 11:13   ` Julia Lawall
  0 siblings, 0 replies; 4+ messages in thread
From: Julia Lawall @ 2020-05-13 11:13 UTC (permalink / raw)
  To: Jaskaran Singh; +Cc: Coccinelle

> Hi Christoph,
>
> I've sent a patch for this, it should be merged after review. Sorry for
> the inconvenience!

All is well now.  The change is available in github.

julia
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-12 11:57 [Cocci] Regression since recent parentypes patches were merged Christoph Böhmwalder
2020-05-12 12:30 ` Julia Lawall
2020-05-13  7:32 ` Jaskaran Singh
2020-05-13 11:13   ` Julia Lawall

Coccinelle archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/cocci/0 cocci/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 cocci cocci/ https://lore.kernel.org/cocci \
		cocci@systeme.lip6.fr
	public-inbox-index cocci

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/fr.lip6.systeme.cocci


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git