| Line | Source | Count |
| 1 | struct Bitvec { | - |
| 2 | u32 iSize; | - |
| 3 | u32 nSet; | - |
| 4 | | - |
| 5 | | - |
| 6 | u32 iDivisor; | - |
| 7 | | - |
| 8 | | - |
| 9 | | - |
| 10 | union { | - |
| 11 | u8 aBitmap[((((512 -(3*sizeof(u32)))/sizeof(Bitvec*))*sizeof(Bitvec*))/sizeof(u8))]; | - |
| 12 | u32 aHash[((((512 -(3*sizeof(u32)))/sizeof(Bitvec*))*sizeof(Bitvec*))/sizeof(u32))]; | - |
| 13 | Bitvec *apSub[((((512 -(3*sizeof(u32)))/sizeof(Bitvec*))*sizeof(Bitvec*))/sizeof(Bitvec *))]; | - |
| 14 | } u; | - |
| 15 | }; | - |
| 16 | | - |
| 17 | | - |
| 18 | | - |
| 19 | | - |
| 20 | | - |
| 21 | | - |
| 22 | Bitvec *sqlite3BitvecCreate(u32 iSize){ | - |
| 23 | Bitvec *p; | - |
| 24 | | - |
| 25 | ((void) (0)) | - |
| 26 | ; | - |
| 27 | p = sqlite3MallocZero( sizeof(*p) ); | - |
| 28 | if( p| TRUE | evaluated 351440 times by 380 testsEvaluated by:- Self test
- Self test (10)
- Self test (101)
- Self test (104)
- Self test (106)
- Self test (107)
- Self test (108)
- Self test (109)
- Self test (11)
- Self test (110)
- Self test (111)
- Self test (112)
- Self test (113)
- Self test (114)
- Self test (115)
- Self test (116)
- Self test (117)
- Self test (118)
- Self test (119)
- Self test (12)
- Self test (120)
- Self test (121)
- Self test (122)
- Self test (123)
- Self test (124)
- ...
| | FALSE | evaluated 136 times by 1 test |
){ | 136-351440 |
| 29 | p->iSize = iSize; | - |
| 30 | }executed 351440 times by 380 tests: end of blockExecuted by:- Self test
- Self test (10)
- Self test (101)
- Self test (104)
- Self test (106)
- Self test (107)
- Self test (108)
- Self test (109)
- Self test (11)
- Self test (110)
- Self test (111)
- Self test (112)
- Self test (113)
- Self test (114)
- Self test (115)
- Self test (116)
- Self test (117)
- Self test (118)
- Self test (119)
- Self test (12)
- Self test (120)
- Self test (121)
- Self test (122)
- Self test (123)
- Self test (124)
- ...
| 351440 |
| 31 | returnexecuted 351576 times by 380 tests: return p;Executed by:- Self test
- Self test (10)
- Self test (101)
- Self test (104)
- Self test (106)
- Self test (107)
- Self test (108)
- Self test (109)
- Self test (11)
- Self test (110)
- Self test (111)
- Self test (112)
- Self test (113)
- Self test (114)
- Self test (115)
- Self test (116)
- Self test (117)
- Self test (118)
- Self test (119)
- Self test (12)
- Self test (120)
- Self test (121)
- Self test (122)
- Self test (123)
- Self test (124)
- ...
p;executed 351576 times by 380 tests: return p;Executed by:- Self test
- Self test (10)
- Self test (101)
- Self test (104)
- Self test (106)
- Self test (107)
- Self test (108)
- Self test (109)
- Self test (11)
- Self test (110)
- Self test (111)
- Self test (112)
- Self test (113)
- Self test (114)
- Self test (115)
- Self test (116)
- Self test (117)
- Self test (118)
- Self test (119)
- Self test (12)
- Self test (120)
- Self test (121)
- Self test (122)
- Self test (123)
- Self test (124)
- ...
| 351576 |
| 32 | } | - |
| 33 | | - |
| 34 | | - |
| 35 | | - |
| 36 | | - |
| 37 | | - |
| 38 | | - |
| 39 | int sqlite3BitvecTestNotNull(Bitvec *p, u32 i){ | - |
| 40 | | - |
| 41 | ((void) (0)) | - |
| 42 | ; | - |
| 43 | i--; | - |
| 44 | if( i>=p->iSize| TRUE | evaluated 830574 times by 289 testsEvaluated by:- Self test
- Self test (10)
- Self test (101)
- Self test (104)
- Self test (11)
- Self test (12)
- Self test (13)
- Self test (14)
- Self test (15)
- Self test (17)
- Self test (18)
- Self test (185)
- Self test (186)
- Self test (187)
- Self test (188)
- Self test (189)
- Self test (19)
- Self test (190)
- Self test (191)
- Self test (192)
- Self test (193)
- Self test (194)
- Self test (195)
- Self test (196)
- Self test (197)
- ...
| | FALSE | evaluated 42788765 times by 377 testsEvaluated by:- Self test
- Self test (10)
- Self test (104)
- Self test (107)
- Self test (108)
- Self test (109)
- Self test (11)
- Self test (110)
- Self test (111)
- Self test (112)
- Self test (113)
- Self test (114)
- Self test (115)
- Self test (116)
- Self test (117)
- Self test (118)
- Self test (119)
- Self test (12)
- Self test (120)
- Self test (121)
- Self test (122)
- Self test (123)
- Self test (124)
- Self test (125)
- Self test (126)
- ...
|
) returnexecuted 830574 times by 289 tests: return 0;Executed by:- Self test
- Self test (10)
- Self test (101)
- Self test (104)
- Self test (11)
- Self test (12)
- Self test (13)
- Self test (14)
- Self test (15)
- Self test (17)
- Self test (18)
- Self test (185)
- Self test (186)
- Self test (187)
- Self test (188)
- Self test (189)
- Self test (19)
- Self test (190)
- Self test (191)
- Self test (192)
- Self test (193)
- Self test (194)
- Self test (195)
- Self test (196)
- Self test (197)
- ...
0;executed 830574 times by 289 tests: return 0;Executed by:- Self test
- Self test (10)
- Self test (101)
- Self test (104)
- Self test (11)
- Self test (12)
- Self test (13)
- Self test (14)
- Self test (15)
- Self test (17)
- Self test (18)
- Self test (185)
- Self test (186)
- Self test (187)
- Self test (188)
- Self test (189)
- Self test (19)
- Self test (190)
- Self test (191)
- Self test (192)
- Self test (193)
- Self test (194)
- Self test (195)
- Self test (196)
- Self test (197)
- ...
| 830574-42788765 |
| 45 | while( p->iDivisor| TRUE | evaluated 54979520 times by 1 test | | FALSE | evaluated 42393679 times by 377 testsEvaluated by:- Self test
- Self test (10)
- Self test (104)
- Self test (107)
- Self test (108)
- Self test (109)
- Self test (11)
- Self test (110)
- Self test (111)
- Self test (112)
- Self test (113)
- Self test (114)
- Self test (115)
- Self test (116)
- Self test (117)
- Self test (118)
- Self test (119)
- Self test (12)
- Self test (120)
- Self test (121)
- Self test (122)
- Self test (123)
- Self test (124)
- Self test (125)
- Self test (126)
- ...
|
){ | 42393679-54979520 |
| 46 | u32 bin = i/p->iDivisor; | - |
| 47 | i = i%p->iDivisor; | - |
| 48 | p = p->u.apSub[bin]; | - |
| 49 | if (!p| TRUE | evaluated 395086 times by 1 test | | FALSE | evaluated 54584434 times by 1 test |
) { | 395086-54584434 |
| 50 | returnexecuted 395086 times by 1 test: return 0; 0;executed 395086 times by 1 test: return 0; | 395086 |
| 51 | } | - |
| 52 | }executed 54584434 times by 1 test: end of block | 54584434 |
| 53 | if( p->iSize<=(((((512 -(3*sizeof(u32)))/sizeof(Bitvec*))*sizeof(Bitvec*))/sizeof(u8))*8)| TRUE | evaluated 41799885 times by 377 testsEvaluated by:- Self test
- Self test (10)
- Self test (104)
- Self test (107)
- Self test (108)
- Self test (109)
- Self test (11)
- Self test (110)
- Self test (111)
- Self test (112)
- Self test (113)
- Self test (114)
- Self test (115)
- Self test (116)
- Self test (117)
- Self test (118)
- Self test (119)
- Self test (12)
- Self test (120)
- Self test (121)
- Self test (122)
- Self test (123)
- Self test (124)
- Self test (125)
- Self test (126)
- ...
| | FALSE | evaluated 593794 times by 1 test |
){ | 593794-41799885 |
| 54 | returnexecuted 41799885 times by 377 tests: return (p->u.aBitmap[i/8] & (1<<(i&(8 -1))))!=0;Executed by:- Self test
- Self test (10)
- Self test (104)
- Self test (107)
- Self test (108)
- Self test (109)
- Self test (11)
- Self test (110)
- Self test (111)
- Self test (112)
- Self test (113)
- Self test (114)
- Self test (115)
- Self test (116)
- Self test (117)
- Self test (118)
- Self test (119)
- Self test (12)
- Self test (120)
- Self test (121)
- Self test (122)
- Self test (123)
- Self test (124)
- Self test (125)
- Self test (126)
- ...
(p->u.aBitmap[i/8] & (1<<(i&(8 -1))))!=0;executed 41799885 times by 377 tests: return (p->u.aBitmap[i/8] & (1<<(i&(8 -1))))!=0;Executed by:- Self test
- Self test (10)
- Self test (104)
- Self test (107)
- Self test (108)
- Self test (109)
- Self test (11)
- Self test (110)
- Self test (111)
- Self test (112)
- Self test (113)
- Self test (114)
- Self test (115)
- Self test (116)
- Self test (117)
- Self test (118)
- Self test (119)
- Self test (12)
- Self test (120)
- Self test (121)
- Self test (122)
- Self test (123)
- Self test (124)
- Self test (125)
- Self test (126)
- ...
| 41799885 |
| 55 | } else{ | - |
| 56 | u32 h = (((i++)*1)%((((512 -(3*sizeof(u32)))/sizeof(Bitvec*))*sizeof(Bitvec*))/sizeof(u32))); | - |
| 57 | while( p->u.aHash[h]| TRUE | evaluated 92777 times by 1 test | | FALSE | evaluated 549566 times by 1 test |
){ | 92777-549566 |
| 58 | if( p->u.aHash[h]==i| TRUE | evaluated 44228 times by 1 test | | FALSE | evaluated 48549 times by 1 test |
) returnexecuted 44228 times by 1 test: return 1; 1;executed 44228 times by 1 test: return 1; | 44228-48549 |
| 59 | h = (h+1) % ((((512 -(3*sizeof(u32)))/sizeof(Bitvec*))*sizeof(Bitvec*))/sizeof(u32)); | - |
| 60 | }executed 48549 times by 1 test: end of block | 48549 |
| 61 | returnexecuted 549566 times by 1 test: return 0; 0;executed 549566 times by 1 test: return 0; | 549566 |
| 62 | } | - |
| 63 | } | - |
| 64 | int sqlite3BitvecTest(Bitvec *p, u32 i){ | - |
| 65 | returnexecuted 20241311 times by 38 tests: return p!=0 && sqlite3BitvecTestNotNull(p,i);Executed by:- Self test (10)
- Self test (100)
- Self test (11)
- Self test (12)
- Self test (13)
- Self test (14)
- Self test (15)
- Self test (16)
- Self test (17)
- Self test (18)
- Self test (19)
- Self test (2)
- Self test (20)
- Self test (21)
- Self test (22)
- Self test (23)
- Self test (3)
- Self test (32)
- Self test (33)
- Self test (39)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (54)
- Self test (55)
- ...
p!=0| TRUE | evaluated 20139815 times by 26 testsEvaluated by:- Self test (10)
- Self test (11)
- Self test (12)
- Self test (13)
- Self test (14)
- Self test (15)
- Self test (16)
- Self test (17)
- Self test (18)
- Self test (19)
- Self test (2)
- Self test (20)
- Self test (21)
- Self test (22)
- Self test (23)
- Self test (3)
- Self test (32)
- Self test (33)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (54)
- Self test (6)
- Self test (7)
- Self test (8)
- ...
| | FALSE | evaluated 101496 times by 26 testsEvaluated by:- Self test (10)
- Self test (100)
- Self test (12)
- Self test (14)
- Self test (16)
- Self test (18)
- Self test (2)
- Self test (20)
- Self test (22)
- Self test (3)
- Self test (39)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (55)
- Self test (6)
- Self test (8)
- Self test (91)
- Self test (92)
- Self test (93)
- Self test (94)
- Self test (95)
- Self test (96)
- Self test (97)
- Self test (98)
- ...
|
&& sqlite3BitvecTestNotNull(p,i)| TRUE | evaluated 1231053 times by 13 testsEvaluated by:- Self test (10)
- Self test (12)
- Self test (14)
- Self test (16)
- Self test (18)
- Self test (20)
- Self test (22)
- Self test (32)
- Self test (33)
- Self test (438)
- Self test (54)
- Self test (6)
- Self test (8)
| | FALSE | evaluated 18908762 times by 23 testsEvaluated by:- Self test (10)
- Self test (11)
- Self test (12)
- Self test (13)
- Self test (14)
- Self test (15)
- Self test (16)
- Self test (17)
- Self test (18)
- Self test (19)
- Self test (2)
- Self test (20)
- Self test (21)
- Self test (22)
- Self test (23)
- Self test (3)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (6)
- Self test (7)
- Self test (8)
- Self test (9)
|
;executed 20241311 times by 38 tests: return p!=0 && sqlite3BitvecTestNotNull(p,i);Executed by:- Self test (10)
- Self test (100)
- Self test (11)
- Self test (12)
- Self test (13)
- Self test (14)
- Self test (15)
- Self test (16)
- Self test (17)
- Self test (18)
- Self test (19)
- Self test (2)
- Self test (20)
- Self test (21)
- Self test (22)
- Self test (23)
- Self test (3)
- Self test (32)
- Self test (33)
- Self test (39)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (54)
- Self test (55)
- ...
| 101496-20241311 |
| 66 | } | - |
| 67 | int sqlite3BitvecSet(Bitvec *p, u32 i){ | - |
| 68 | u32 h; | - |
| 69 | if( p==0| TRUE | evaluated 9272 times by 1 test | | FALSE | evaluated 38360328 times by 374 testsEvaluated by:- Self test
- Self test (10)
- Self test (104)
- Self test (11)
- Self test (110)
- Self test (111)
- Self test (112)
- Self test (113)
- Self test (114)
- Self test (115)
- Self test (116)
- Self test (117)
- Self test (118)
- Self test (119)
- Self test (12)
- Self test (120)
- Self test (121)
- Self test (122)
- Self test (123)
- Self test (124)
- Self test (125)
- Self test (126)
- Self test (127)
- Self test (128)
- Self test (129)
- ...
|
) returnexecuted 9272 times by 1 test: return 0; 0;executed 9272 times by 1 test: return 0; | 9272-38360328 |
| 70 | | - |
| 71 | ((void) (0)) | - |
| 72 | ; | - |
| 73 | | - |
| 74 | ((void) (0)) | - |
| 75 | ; | - |
| 76 | i--; | - |
| 77 | while((| TRUE | evaluated 56666595 times by 1 test | | FALSE | evaluated 37827562 times by 374 testsEvaluated by:- Self test
- Self test (10)
- Self test (104)
- Self test (11)
- Self test (110)
- Self test (111)
- Self test (112)
- Self test (113)
- Self test (114)
- Self test (115)
- Self test (116)
- Self test (117)
- Self test (118)
- Self test (119)
- Self test (12)
- Self test (120)
- Self test (121)
- Self test (122)
- Self test (123)
- Self test (124)
- Self test (125)
- Self test (126)
- Self test (127)
- Self test (128)
- Self test (129)
- ...
|
p->iSize > (((((512 -(3*sizeof(u32)))/sizeof(Bitvec*))*sizeof(Bitvec*))/sizeof(u8))*8))| TRUE | evaluated 56666595 times by 1 test | | FALSE | evaluated 37827562 times by 374 testsEvaluated by:- Self test
- Self test (10)
- Self test (104)
- Self test (11)
- Self test (110)
- Self test (111)
- Self test (112)
- Self test (113)
- Self test (114)
- Self test (115)
- Self test (116)
- Self test (117)
- Self test (118)
- Self test (119)
- Self test (12)
- Self test (120)
- Self test (121)
- Self test (122)
- Self test (123)
- Self test (124)
- Self test (125)
- Self test (126)
- Self test (127)
- Self test (128)
- Self test (129)
- ...
|
&& p->iDivisor| TRUE | evaluated 56133953 times by 1 test | | FALSE | evaluated 532642 times by 1 test |
) { | 532642-56666595 |
| 78 | u32 bin = i/p->iDivisor; | - |
| 79 | i = i%p->iDivisor; | - |
| 80 | if( p->u.apSub[bin]==0| TRUE | evaluated 264392 times by 1 test | | FALSE | evaluated 55869561 times by 1 test |
){ | 264392-55869561 |
| 81 | p->u.apSub[bin] = sqlite3BitvecCreate( p->iDivisor ); | - |
| 82 | if( p->u.apSub[bin]==0| TRUE | evaluated 124 times by 1 test | | FALSE | evaluated 264268 times by 1 test |
) returnexecuted 124 times by 1 test: return 7; 7;executed 124 times by 1 test: return 7; | 124-264268 |
| 83 | }executed 264268 times by 1 test: end of block | 264268 |
| 84 | p = p->u.apSub[bin]; | - |
| 85 | }executed 56133829 times by 1 test: end of block | 56133829 |
| 86 | if( p->iSize<=(((((512 -(3*sizeof(u32)))/sizeof(Bitvec*))*sizeof(Bitvec*))/sizeof(u8))*8)| TRUE | evaluated 37827562 times by 374 testsEvaluated by:- Self test
- Self test (10)
- Self test (104)
- Self test (11)
- Self test (110)
- Self test (111)
- Self test (112)
- Self test (113)
- Self test (114)
- Self test (115)
- Self test (116)
- Self test (117)
- Self test (118)
- Self test (119)
- Self test (12)
- Self test (120)
- Self test (121)
- Self test (122)
- Self test (123)
- Self test (124)
- Self test (125)
- Self test (126)
- Self test (127)
- Self test (128)
- Self test (129)
- ...
| | FALSE | evaluated 532642 times by 1 test |
){ | 532642-37827562 |
| 87 | p->u.aBitmap[i/8] |= 1 << (i&(8 -1)); | - |
| 88 | returnexecuted 37827562 times by 374 tests: return 0;Executed by:- Self test
- Self test (10)
- Self test (104)
- Self test (11)
- Self test (110)
- Self test (111)
- Self test (112)
- Self test (113)
- Self test (114)
- Self test (115)
- Self test (116)
- Self test (117)
- Self test (118)
- Self test (119)
- Self test (12)
- Self test (120)
- Self test (121)
- Self test (122)
- Self test (123)
- Self test (124)
- Self test (125)
- Self test (126)
- Self test (127)
- Self test (128)
- Self test (129)
- ...
0;executed 37827562 times by 374 tests: return 0;Executed by:- Self test
- Self test (10)
- Self test (104)
- Self test (11)
- Self test (110)
- Self test (111)
- Self test (112)
- Self test (113)
- Self test (114)
- Self test (115)
- Self test (116)
- Self test (117)
- Self test (118)
- Self test (119)
- Self test (12)
- Self test (120)
- Self test (121)
- Self test (122)
- Self test (123)
- Self test (124)
- Self test (125)
- Self test (126)
- Self test (127)
- Self test (128)
- Self test (129)
- ...
| 37827562 |
| 89 | } | - |
| 90 | h = (((i++)*1)%((((512 -(3*sizeof(u32)))/sizeof(Bitvec*))*sizeof(Bitvec*))/sizeof(u32))); | - |
| 91 | | - |
| 92 | | - |
| 93 | | - |
| 94 | if( !p->u.aHash[h]| TRUE | evaluated 530515 times by 1 test | | FALSE | evaluated 2127 times by 1 test |
){ | 2127-530515 |
| 95 | if (p->nSet<(((((512 -(3*sizeof(u32)))/sizeof(Bitvec*))*sizeof(Bitvec*))/sizeof(u32))-1)| TRUE | evaluated 526280 times by 1 test | | FALSE | evaluated 4235 times by 1 test |
) { | 4235-526280 |
| 96 | gotoexecuted 526280 times by 1 test: goto bitvec_set_end; bitvec_set_end;executed 526280 times by 1 test: goto bitvec_set_end; | 526280 |
| 97 | } else { | - |
| 98 | gotoexecuted 4235 times by 1 test: goto bitvec_set_rehash; bitvec_set_rehash;executed 4235 times by 1 test: goto bitvec_set_rehash; | 4235 |
| 99 | } | - |
| 100 | } | - |
| 101 | | - |
| 102 | | - |
| 103 | do { | - |
| 104 | if( p->u.aHash[h]==i| TRUE | evaluated 196 times by 1 test | | FALSE | evaluated 11449 times by 1 test |
) returnexecuted 196 times by 1 test: return 0; 0;executed 196 times by 1 test: return 0; | 196-11449 |
| 105 | h++; | - |
| 106 | if( h>=((((512 -(3*sizeof(u32)))/sizeof(Bitvec*))*sizeof(Bitvec*))/sizeof(u32))| TRUE | evaluated 79 times by 1 test | | FALSE | evaluated 11370 times by 1 test |
) h = 0;executed 79 times by 1 test: h = 0; | 79-11370 |
| 107 | }executed 11449 times by 1 test: end of block while( p->u.aHash[h]| TRUE | evaluated 9518 times by 1 test | | FALSE | evaluated 1931 times by 1 test |
); | 1931-11449 |
| 108 | | - |
| 109 | | - |
| 110 | | - |
| 111 | bitvec_set_rehash:code before this statement executed 1931 times by 1 test: bitvec_set_rehash: | 1931 |
| 112 | if( p->nSet>=(((((512 -(3*sizeof(u32)))/sizeof(Bitvec*))*sizeof(Bitvec*))/sizeof(u32))/2)| TRUE | evaluated 4319 times by 1 test | | FALSE | evaluated 1847 times by 1 test |
){ | 1847-4319 |
| 113 | unsigned int j; | - |
| 114 | int rc; | - |
| 115 | u32 *aiValues = sqlite3DbMallocRaw(0,sizeof(p->u.aHash)); | - |
| 116 | if( aiValues==0| TRUE | evaluated 2 times by 1 test | | FALSE | evaluated 4317 times by 1 test |
){ | 2-4317 |
| 117 | returnexecuted 2 times by 1 test: return 7; 7;executed 2 times by 1 test: return 7; | 2 |
| 118 | }else{ | - |
| 119 | memcpy(aiValues, p->u.aHash, sizeof(p->u.aHash)); | - |
| 120 | memset(p->u.apSub, 0, sizeof(p->u.apSub)); | - |
| 121 | p->iDivisor = (p->iSize + ((((512 -(3*sizeof(u32)))/sizeof(Bitvec*))*sizeof(Bitvec*))/sizeof(Bitvec *)) - 1)/((((512 -(3*sizeof(u32)))/sizeof(Bitvec*))*sizeof(Bitvec*))/sizeof(Bitvec *)); | - |
| 122 | rc = sqlite3BitvecSet(p, i); | - |
| 123 | for(j=0; j<((((512 -(3*sizeof(u32)))/sizeof(Bitvec*))*sizeof(Bitvec*))/sizeof(u32))| TRUE | evaluated 535308 times by 1 test | | FALSE | evaluated 4317 times by 1 test |
; j++){ | 4317-535308 |
| 124 | if( aiValues[j]| TRUE | evaluated 526580 times by 1 test | | FALSE | evaluated 8728 times by 1 test |
) rc |= sqlite3BitvecSet(p, aiValues[j]);executed 526580 times by 1 test: rc |= sqlite3BitvecSet(p, aiValues[j]); | 8728-526580 |
| 125 | }executed 535308 times by 1 test: end of block | 535308 |
| 126 | sqlite3DbFree(0,aiValues); | - |
| 127 | returnexecuted 4317 times by 1 test: return rc; rc;executed 4317 times by 1 test: return rc; | 4317 |
| 128 | } | - |
| 129 | } | - |
| 130 | bitvec_set_end:code before this statement executed 1847 times by 1 test: bitvec_set_end: | 1847 |
| 131 | p->nSet++; | - |
| 132 | p->u.aHash[h] = i; | - |
| 133 | returnexecuted 528127 times by 1 test: return 0; 0;executed 528127 times by 1 test: return 0; | 528127 |
| 134 | } | - |
| 135 | | - |
| 136 | | - |
| 137 | | - |
| 138 | | - |
| 139 | | - |
| 140 | | - |
| 141 | | - |
| 142 | void sqlite3BitvecClear(Bitvec *p, u32 i, void *pBuf){ | - |
| 143 | if( p==0| TRUE | evaluated 172 times by 1 test | | FALSE | evaluated 18465827 times by 1 test |
) return;executed 172 times by 1 test: return; | 172-18465827 |
| 144 | | - |
| 145 | ((void) (0)) | - |
| 146 | ; | - |
| 147 | i--; | - |
| 148 | while( p->iDivisor| TRUE | evaluated 53123904 times by 1 test | | FALSE | evaluated 18070914 times by 1 test |
){ | 18070914-53123904 |
| 149 | u32 bin = i/p->iDivisor; | - |
| 150 | i = i%p->iDivisor; | - |
| 151 | p = p->u.apSub[bin]; | - |
| 152 | if (!p| TRUE | evaluated 394913 times by 1 test | | FALSE | evaluated 52728991 times by 1 test |
) { | 394913-52728991 |
| 153 | return;executed 394913 times by 1 test: return; | 394913 |
| 154 | } | - |
| 155 | }executed 52728991 times by 1 test: end of block | 52728991 |
| 156 | if( p->iSize<=(((((512 -(3*sizeof(u32)))/sizeof(Bitvec*))*sizeof(Bitvec*))/sizeof(u8))*8)| TRUE | evaluated 17916889 times by 1 test | | FALSE | evaluated 154025 times by 1 test |
){ | 154025-17916889 |
| 157 | p->u.aBitmap[i/8] &= ~(1 << (i&(8 -1))); | - |
| 158 | }executed 17916889 times by 1 test: end of block else{ | 17916889 |
| 159 | unsigned int j; | - |
| 160 | u32 *aiValues = pBuf; | - |
| 161 | memcpy(aiValues, p->u.aHash, sizeof(p->u.aHash)); | - |
| 162 | memset(p->u.aHash, 0, sizeof(p->u.aHash)); | - |
| 163 | p->nSet = 0; | - |
| 164 | for(j=0; j<((((512 -(3*sizeof(u32)))/sizeof(Bitvec*))*sizeof(Bitvec*))/sizeof(u32))| TRUE | evaluated 19099100 times by 1 test | | FALSE | evaluated 154025 times by 1 test |
; j++){ | 154025-19099100 |
| 165 | if( aiValues[j]| TRUE | evaluated 3700904 times by 1 test | | FALSE | evaluated 15398196 times by 1 test |
&& aiValues[j]!=(i+1)| TRUE | evaluated 3699809 times by 1 test | | FALSE | evaluated 1095 times by 1 test |
){ | 1095-15398196 |
| 166 | u32 h = (((aiValues[j]-1)*1)%((((512 -(3*sizeof(u32)))/sizeof(Bitvec*))*sizeof(Bitvec*))/sizeof(u32))); | - |
| 167 | p->nSet++; | - |
| 168 | while( p->u.aHash[h]| TRUE | evaluated 12219756 times by 1 test | | FALSE | evaluated 3699809 times by 1 test |
){ | 3699809-12219756 |
| 169 | h++; | - |
| 170 | if( h>=((((512 -(3*sizeof(u32)))/sizeof(Bitvec*))*sizeof(Bitvec*))/sizeof(u32))| TRUE | evaluated 65592 times by 1 test | | FALSE | evaluated 12154164 times by 1 test |
) h = 0;executed 65592 times by 1 test: h = 0; | 65592-12154164 |
| 171 | }executed 12219756 times by 1 test: end of block | 12219756 |
| 172 | p->u.aHash[h] = aiValues[j]; | - |
| 173 | }executed 3699809 times by 1 test: end of block | 3699809 |
| 174 | }executed 19099100 times by 1 test: end of block | 19099100 |
| 175 | }executed 154025 times by 1 test: end of block | 154025 |
| 176 | } | - |
| 177 | | - |
| 178 | | - |
| 179 | | - |
| 180 | | - |
| 181 | void sqlite3BitvecDestroy(Bitvec *p){ | - |
| 182 | if( p==0| TRUE | evaluated 703291 times by 438 testsEvaluated by:- Self test
- Self test (10)
- Self test (100)
- Self test (101)
- Self test (102)
- Self test (103)
- Self test (104)
- Self test (105)
- Self test (106)
- Self test (107)
- Self test (108)
- Self test (109)
- Self test (11)
- Self test (110)
- Self test (111)
- Self test (112)
- Self test (113)
- Self test (114)
- Self test (115)
- Self test (116)
- Self test (117)
- Self test (118)
- Self test (119)
- Self test (12)
- Self test (120)
- ...
| | FALSE | evaluated 351079 times by 43 testsEvaluated by:- Self test
- Self test (10)
- Self test (101)
- Self test (104)
- Self test (11)
- Self test (12)
- Self test (14)
- Self test (15)
- Self test (16)
- Self test (18)
- Self test (19)
- Self test (2)
- Self test (20)
- Self test (22)
- Self test (23)
- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (3)
- Self test (31)
- Self test (32)
- Self test (33)
- Self test (34)
- Self test (38)
- ...
|
) return;executed 703291 times by 438 tests: return;Executed by:- Self test
- Self test (10)
- Self test (100)
- Self test (101)
- Self test (102)
- Self test (103)
- Self test (104)
- Self test (105)
- Self test (106)
- Self test (107)
- Self test (108)
- Self test (109)
- Self test (11)
- Self test (110)
- Self test (111)
- Self test (112)
- Self test (113)
- Self test (114)
- Self test (115)
- Self test (116)
- Self test (117)
- Self test (118)
- Self test (119)
- Self test (12)
- Self test (120)
- ...
| 351079-703291 |
| 183 | if( p->iDivisor| TRUE | evaluated 4317 times by 1 test | | FALSE | evaluated 346762 times by 43 testsEvaluated by:- Self test
- Self test (10)
- Self test (101)
- Self test (104)
- Self test (11)
- Self test (12)
- Self test (14)
- Self test (15)
- Self test (16)
- Self test (18)
- Self test (19)
- Self test (2)
- Self test (20)
- Self test (22)
- Self test (23)
- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (3)
- Self test (31)
- Self test (32)
- Self test (33)
- Self test (34)
- Self test (38)
- ...
|
){ | 4317-346762 |
| 184 | unsigned int i; | - |
| 185 | for(i=0; i<((((512 -(3*sizeof(u32)))/sizeof(Bitvec*))*sizeof(Bitvec*))/sizeof(Bitvec *))| TRUE | evaluated 267654 times by 1 test | | FALSE | evaluated 4317 times by 1 test |
; i++){ | 4317-267654 |
| 186 | sqlite3BitvecDestroy(p->u.apSub[i]); | - |
| 187 | }executed 267654 times by 1 test: end of block | 267654 |
| 188 | }executed 4317 times by 1 test: end of block | 4317 |
| 189 | sqlite3_free(p); | - |
| 190 | }executed 351079 times by 43 tests: end of blockExecuted by:- Self test
- Self test (10)
- Self test (101)
- Self test (104)
- Self test (11)
- Self test (12)
- Self test (14)
- Self test (15)
- Self test (16)
- Self test (18)
- Self test (19)
- Self test (2)
- Self test (20)
- Self test (22)
- Self test (23)
- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (3)
- Self test (31)
- Self test (32)
- Self test (33)
- Self test (34)
- Self test (38)
- ...
| 351079 |
| 191 | | - |
| 192 | | - |
| 193 | | - |
| 194 | | - |
| 195 | | - |
| 196 | u32 sqlite3BitvecSize(Bitvec *p){ | - |
| 197 | returnexecuted 387681 times by 15 tests: return p->iSize;Executed by:- Self test
- Self test (14)
- Self test (16)
- Self test (18)
- Self test (20)
- Self test (22)
- Self test (32)
- Self test (33)
- Self test (34)
- Self test (438)
- Self test (54)
- Self test (57)
- Self test (58)
- Self test (6)
- Self test (8)
p->iSize;executed 387681 times by 15 tests: return p->iSize;Executed by:- Self test
- Self test (14)
- Self test (16)
- Self test (18)
- Self test (20)
- Self test (22)
- Self test (32)
- Self test (33)
- Self test (34)
- Self test (438)
- Self test (54)
- Self test (57)
- Self test (58)
- Self test (6)
- Self test (8)
| 387681 |
| 198 | } | - |
| 199 | int sqlite3BitvecBuiltinTest(int sz, int *aOp){ | - |
| 200 | Bitvec *pBitvec = 0; | - |
| 201 | unsigned char *pV = 0; | - |
| 202 | int rc = -1; | - |
| 203 | int i, nx, pc, op; | - |
| 204 | void *pTmpSpace; | - |
| 205 | | - |
| 206 | | - |
| 207 | | - |
| 208 | pBitvec = sqlite3BitvecCreate( sz ); | - |
| 209 | pV = sqlite3MallocZero( (sz+7)/8 + 1 ); | - |
| 210 | pTmpSpace = sqlite3_malloc64(512); | - |
| 211 | if( pBitvec==0| TRUE | evaluated 2 times by 1 test | | FALSE | evaluated 178 times by 1 test |
|| pV==0| TRUE | evaluated 3 times by 1 test | | FALSE | evaluated 175 times by 1 test |
|| pTmpSpace==0| TRUE | evaluated 3 times by 1 test | | FALSE | evaluated 172 times by 1 test |
) gotoexecuted 8 times by 1 test: goto bitvec_end; bitvec_end;executed 8 times by 1 test: goto bitvec_end; | 2-178 |
| 212 | | - |
| 213 | | - |
| 214 | sqlite3BitvecSet(0, 1); | - |
| 215 | sqlite3BitvecClear(0, 1, pTmpSpace); | - |
| 216 | | - |
| 217 | | - |
| 218 | pc = 0; | - |
| 219 | while( (| TRUE | evaluated 38841234 times by 1 test | | FALSE | evaluated 46 times by 1 test |
op = aOp[pc])!=0| TRUE | evaluated 38841234 times by 1 test | | FALSE | evaluated 46 times by 1 test |
){ | 46-38841234 |
| 220 | switch( op ){ | - |
| 221 | caseexecuted 20359981 times by 1 test: case 1: 1:executed 20359981 times by 1 test: case 1: | 20359981 |
| 222 | caseexecuted 18457825 times by 1 test: case 2: 2:executed 18457825 times by 1 test: case 2: | 18457825 |
| 223 | caseexecuted 2 times by 1 test: case 5: 5:executed 2 times by 1 test: case 5: { | 2 |
| 224 | nx = 4; | - |
| 225 | i = aOp[pc+2] - 1; | - |
| 226 | aOp[pc+2] += aOp[pc+3]; | - |
| 227 | break;executed 38817808 times by 1 test: break; | 38817808 |
| 228 | } | - |
| 229 | caseexecuted 15426 times by 1 test: case 3: 3:executed 15426 times by 1 test: case 3: | 15426 |
| 230 | caseexecuted 8000 times by 1 test: case 4: 4:executed 8000 times by 1 test: case 4: | 8000 |
| 231 | default never executed: default: :never executed: default: { | 0 |
| 232 | nx = 2; | - |
| 233 | sqlite3_randomness(sizeof(i), &i); | - |
| 234 | break;executed 23426 times by 1 test: break; | 23426 |
| 235 | } | - |
| 236 | } | - |
| 237 | if( (--| TRUE | evaluated 38841135 times by 1 test | | FALSE | evaluated 99 times by 1 test |
aOp[pc+1]) > 0| TRUE | evaluated 38841135 times by 1 test | | FALSE | evaluated 99 times by 1 test |
) nx = 0;executed 38841135 times by 1 test: nx = 0; | 99-38841135 |
| 238 | pc += nx; | - |
| 239 | i = (i & 0x7fffffff)%sz; | - |
| 240 | if( (| TRUE | evaluated 20375409 times by 1 test | | FALSE | evaluated 18465825 times by 1 test |
op & 1)!=0| TRUE | evaluated 20375409 times by 1 test | | FALSE | evaluated 18465825 times by 1 test |
){ | 18465825-20375409 |
| 241 | pV[(i+1)>>3] |= (1<<((i+1)&7)); | - |
| 242 | if( op!=5| TRUE | evaluated 20375407 times by 1 test | | FALSE | evaluated 2 times by 1 test |
){ | 2-20375407 |
| 243 | if( sqlite3BitvecSet(pBitvec, i+1)| TRUE | evaluated 126 times by 1 test | | FALSE | evaluated 20375281 times by 1 test |
) gotoexecuted 126 times by 1 test: goto bitvec_end; bitvec_end;executed 126 times by 1 test: goto bitvec_end; | 126-20375281 |
| 244 | }executed 20375281 times by 1 test: end of block | 20375281 |
| 245 | }executed 20375283 times by 1 test: end of block else{ | 20375283 |
| 246 | pV[(i+1)>>3] &= ~(1<<((i+1)&7)); | - |
| 247 | sqlite3BitvecClear(pBitvec, i+1, pTmpSpace); | - |
| 248 | }executed 18465825 times by 1 test: end of block | 18465825 |
| 249 | } | - |
| 250 | | - |
| 251 | | - |
| 252 | | - |
| 253 | | - |
| 254 | | - |
| 255 | | - |
| 256 | rc = sqlite3BitvecTest(0,0) + sqlite3BitvecTest(pBitvec, sz+1) | - |
| 257 | + sqlite3BitvecTest(pBitvec, 0) | - |
| 258 | + (sqlite3BitvecSize(pBitvec) - sz); | - |
| 259 | for(i=1; i<=sz| TRUE | evaluated 19789835 times by 1 test | | FALSE | evaluated 44 times by 1 test |
; i++){ | 44-19789835 |
| 260 | if( ((| TRUE | evaluated 2 times by 1 test | | FALSE | evaluated 19789833 times by 1 test |
pV[i>>3]&(1<<(i&7)))!=0)!=sqlite3BitvecTest(pBitvec,i)| TRUE | evaluated 2 times by 1 test | | FALSE | evaluated 19789833 times by 1 test |
){ | 2-19789833 |
| 261 | rc = i; | - |
| 262 | break;executed 2 times by 1 test: break; | 2 |
| 263 | } | - |
| 264 | }executed 19789833 times by 1 test: end of block | 19789833 |
| 265 | | - |
| 266 | | - |
| 267 | bitvec_end:code before this statement executed 46 times by 1 test: bitvec_end: | 46 |
| 268 | sqlite3_free(pTmpSpace); | - |
| 269 | sqlite3_free(pV); | - |
| 270 | sqlite3BitvecDestroy(pBitvec); | - |
| 271 | returnexecuted 180 times by 1 test: return rc; rc;executed 180 times by 1 test: return rc; | 180 |
| 272 | } | - |
| | |