Re: [PATCH v6] coccinelle: tests: unsigned value cannot be lesser than zero

2016-01-05 Thread Geyslan G. Bem
2016-01-05 11:10 GMT-03:00 Geyslan G. Bem : > 2016-01-05 10:02 GMT-03:00 Julia Lawall : >>> *** Error in `/usr/lib/coccinelle/spatch': corrupted double-linked >>> list (not small): 0x01c523d0 *** >>> === Backtrace: = >> >> Wow... I've never seen an error from OCaml like that. >

Re: [PATCH v6] coccinelle: tests: unsigned value cannot be lesser than zero

2016-01-05 Thread Andrzej Hajda
On 01/05/2016 03:17 PM, Julia Lawall wrote: >> +@script:python depends on org@ >> +p << r_cmp.p; >> +e << r.e = ""; >> +@@ >> + >> +msg = "WARNING: Unsigned expression compared with zero: %s" % (e) >> +coccilib.org.print_todo(p[0], msg) >> + >> +@script:python depends on report@ >> +p << r_cmp.p; >

Re: [PATCH v6] coccinelle: tests: unsigned value cannot be lesser than zero

2016-01-05 Thread Geyslan G. Bem
2016-01-05 10:49 GMT-03:00 Andrzej Hajda : > On 01/05/2016 01:59 PM, Geyslan G. Bem wrote: >> Hello, >> >> 2016-01-04 4:45 GMT-03:00 Andrzej Hajda : >>> Unsigned expressions cannot be lesser than zero. Presence of comparisons >>> 'unsigned (<|<=|>|>=) 0' often indicates a bug, usually wrong type of

Re: [PATCH v6] coccinelle: tests: unsigned value cannot be lesser than zero

2016-01-05 Thread Julia Lawall
> +@script:python depends on org@ > +p << r_cmp.p; > +e << r.e = ""; > +@@ > + > +msg = "WARNING: Unsigned expression compared with zero: %s" % (e) > +coccilib.org.print_todo(p[0], msg) > + > +@script:python depends on report@ > +p << r_cmp.p; > +e << r.e = ""; > +@@ > + > +msg = "WARNING: Unsigned

Re: [PATCH v6] coccinelle: tests: unsigned value cannot be lesser than zero

2016-01-05 Thread Geyslan G. Bem
2016-01-05 10:02 GMT-03:00 Julia Lawall : >> *** Error in `/usr/lib/coccinelle/spatch': corrupted double-linked >> list (not small): 0x01c523d0 *** >> === Backtrace: = > > Wow... I've never seen an error from OCaml like that. > > What version of ocaml and Coccinelle are you usi

Re: [PATCH v6] coccinelle: tests: unsigned value cannot be lesser than zero

2016-01-05 Thread Andrzej Hajda
On 01/05/2016 01:59 PM, Geyslan G. Bem wrote: > Hello, > > 2016-01-04 4:45 GMT-03:00 Andrzej Hajda : >> Unsigned expressions cannot be lesser than zero. Presence of comparisons >> 'unsigned (<|<=|>|>=) 0' often indicates a bug, usually wrong type of >> variable. >> The patch beside finding such co

Re: [PATCH v6] coccinelle: tests: unsigned value cannot be lesser than zero

2016-01-05 Thread Julia Lawall
> *** Error in `/usr/lib/coccinelle/spatch': corrupted double-linked > list (not small): 0x01c523d0 *** > === Backtrace: = Wow... I've never seen an error from OCaml like that. What version of ocaml and Coccinelle are you using? julia > /usr/lib/libc.so.6(+0x72055)[0x7fb3ec

Re: [PATCH v6] coccinelle: tests: unsigned value cannot be lesser than zero

2016-01-05 Thread Geyslan G. Bem
Hello, 2016-01-04 4:45 GMT-03:00 Andrzej Hajda : > Unsigned expressions cannot be lesser than zero. Presence of comparisons > 'unsigned (<|<=|>|>=) 0' often indicates a bug, usually wrong type of > variable. > The patch beside finding such comparisons tries to eliminate false positives, > mainly

[PATCH v6] coccinelle: tests: unsigned value cannot be lesser than zero

2016-01-03 Thread Andrzej Hajda
Unsigned expressions cannot be lesser than zero. Presence of comparisons 'unsigned (<|<=|>|>=) 0' often indicates a bug, usually wrong type of variable. The patch beside finding such comparisons tries to eliminate false positives, mainly by bypassing range checks. gcc can detect such comparisons a