Spatch 1.1.1 backward incompatibility
Hi,
I recently(?) got a new version of coccinelle from Fedora:
$ spatch --version spatch version 1.1.1 compiled with OCaml version 5.0.1+dev0-2022-12-15 Flags passed to the configure script: --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --runstatedir=/run --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-python=/usr/bin/python3 --with-menhir=/usr/bin/menhir OCaml scripting support: yes Python scripting support: yes Syntax of regular expressions: PCRE
And it broke a lot of our semantic patches. I now get lots of these warnings:
warning: rule starting on line 248, node 45:
kunmap_local(...)[1,2,20,21,25] in recv_dless_read may be inconsistently modified
warning: rule starting on line 248, node 42: decl:mapped[1,2,20,21,22] in recv_dless_read may be inconsistently modified
warning: rule starting on line 273, node 18: src = ... ;[1,2,8,9,11] in drbd_csum_bio may be inconsistently modified
warning: rule starting on line 273, node 20:
kunmap_local(...)[1,2,8,9,13] in drbd_csum_bio may be inconsistently modified
(By the way: these are reported on stdout, I'm not sure that's intended either)
And the patch output is noticeably different.
This all works fine on 1.1.0, and curiously it also works on the 1.1.1 version in Ubuntu:
$ spatch --version spatch version 1.1.1 compiled with OCaml version 4.13.1 Flags passed to the configure script: --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --enable-ocaml --enable-python --enable-opt OCaml scripting support: yes Python scripting support: yes Syntax of regular expressions: PCRE
I'm trying to come up with a minimal reproducer right now, but just throwing this out there in case anyone has an idea.
Thanks!
Signature · 3 lines
Christoph Böhmwalder LINBIT | Keeping the Digital World Running DRBD HA — Disaster Recovery — Software defined Storage
Quoted 51 lines · Christoph Böhmwalder
Hi,
I recently(?) got a new version of coccinelle from Fedora:
$ spatch --version spatch version 1.1.1 compiled with OCaml version 5.0.1+dev0-2022-12-15 Flags passed to the configure script: --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --runstatedir=/run --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-python=/usr/bin/python3 --with-menhir=/usr/bin/menhir OCaml scripting support: yes Python scripting support: yes Syntax of regular expressions: PCREAnd it broke a lot of our semantic patches. I now get lots of these warnings:
warning: rule starting on line 248, node 45:
kunmap_local(...)[1,2,20,21,25] inrecv_dless_readmay be inconsistently modified
warning: rule starting on line 248, node 42: decl:mapped[1,2,20,21,22] inrecv_dless_readmay be inconsistently modified
warning: rule starting on line 273, node 18: src = ... ;[1,2,8,9,11] indrbd_csum_biomay be inconsistently modified
warning: rule starting on line 273, node 20:
kunmap_local(...)[1,2,8,9,13] indrbd_csum_biomay be inconsistently modified(By the way: these are reported on stdout, I'm not sure that's intended either)
And the patch output is noticeably different.
This all works fine on 1.1.0, and curiously it also works on the 1.1.1 version in Ubuntu:
$ spatch --version spatch version 1.1.1 compiled with OCaml version 4.13.1 Flags passed to the configure script: --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --enable-ocaml --enable-python --enable-opt OCaml scripting support: yes Python scripting support: yes Syntax of regular expressions: PCRE
Quoted 2 lines
I'm trying to come up with a minimal reproducer right now, but just throwing this out there in case anyone has an idea.
Thanks for the report. If convenient you could try the github version.
I really need to make a new release...
julia
Am 16.02.24 um 10:51 schrieb Julia Lawall:
Quoted 2 lines
Thanks for the report. If convenient you could try the github version.
The latest GitHub version (0df3efff) has the same problem. It also seems to have some other issue, because it took 1385.5s (instead of the usual ~25) to process the patch.
I also noticed that Fedora used OCaml 5.0, so I tried with the same commit the Fedora version is based on (0afff7f), but compiled with OCaml 4.14. It didn't make a difference, so it's not an issue with OCaml 5.
I'm trying to bisect this now, will report if I find anything.
Quoted 2 lines
I really need to make a new release...
I was going to ask about that... :)
Quoted 2 lines
julia
Signature · 3 lines
Christoph Böhmwalder LINBIT | Keeping the Digital World Running DRBD HA — Disaster Recovery — Software defined Storage
Quoted 3 lines
The latest GitHub version (
0df3efff) has the same problem. It also seems to have some other issue, because it took 1385.5s (instead of the usual ~25) to process the patch.
How do you think about to share any more details about the SmPL scripts which became affected in your test environments?
Regards,
Markus
Quoted 8 lines · Christoph Böhmwalder
Am 16.02.24 um 10:51 schrieb Julia Lawall:
Quoted 2 lines
Thanks for the report. If convenient you could try the github version.
The latest GitHub version (
0df3efff) has the same problem. It also seems to have some other issue, because it took 1385.5s (instead of the usual ~25) to process the patch.
Quoted 5 lines
I also noticed that Fedora used OCaml 5.0, so I tried with the same commit the Fedora version is based on (0afff7f), but compiled with OCaml 4.14. It didn't make a difference, so it's not an issue with OCaml 5.
I'm trying to bisect this now, will report if I find anything.
OK, thanks. It may be sufficient to bisect your example. You can try for example
--debug --show-trying
to see at what function it is getting stuck.
julia
Quoted 13 lines
Quoted 3 lines
I really need to make a new release...
I was going to ask about that... :)
Quoted 2 lines
julia
--
Christoph Böhmwalder
LINBIT | Keeping the Digital World Running DRBD HA — Disaster Recovery — Software defined Storage