Showing the changes to tests (4 of 6 files). Show all
Unified · Split
| @@ -156,8 +156,18 @@ int main() · 155 unmodified lines | ||
| 156 | 156 | #elif defined test_bcheck_125 |
| 157 | 157 | strcat(&a[3], &a[0]); |
| 158 | 158 | #elif defined test_bcheck_126 |
| 159 | − strchr(&b[0], 'a'); | |
| 159 | + strncat(&a[7], &a[0], 3); | |
| 160 | 160 | #elif defined test_bcheck_127 |
| 161 | + strncat(&a[0], &b[3], 8); | |
| 162 | +#elif defined test_bcheck_128 | |
| 163 | + strncat(&a[0], &a[4], 3); | |
| 164 | +#elif defined test_bcheck_129 | |
| 165 | + strncat(&a[3], &a[0], 10); | |
| 166 | +#elif defined test_bcheck_130 | |
| 167 | + strchr(&b[0], 'a'); | |
| 168 | +#elif defined test_bcheck_131 | |
| 169 | + strrchr(&b[0], 'a'); | |
| 170 | +#elif defined test_bcheck_132 | |
| 161 | 171 | free(strdup(&b[0])); |
| 162 | 172 | #endif |
| 163 | 173 | } |
| @@ -134,9 +134,29 @@ · 133 unmodified lines | ||
| 134 | 134 | [returns 255] |
| 135 | 135 | |
| 136 | 136 | [test_bcheck_126] |
| 137 | −112_backtrace.c:159: at main: BCHECK: invalid pointer ........, size 0x? in strchr | |
| 137 | +112_backtrace.c:159: at main: BCHECK: invalid pointer ........, size 0x? in strncat dest | |
| 138 | 138 | [returns 255] |
| 139 | 139 | |
| 140 | 140 | [test_bcheck_127] |
| 141 | −112_backtrace.c:161: at main: BCHECK: invalid pointer ........, size 0x? in strdup | |
| 141 | +112_backtrace.c:161: at main: BCHECK: invalid pointer ........, size 0x? in strncat dest | |
| 142 | +[returns 255] | |
| 143 | + | |
| 144 | +[test_bcheck_128] | |
| 145 | +112_backtrace.c:163: at main: BCHECK: overlapping regions ........(0x?), ........(0x?) in strncat | |
| 146 | +[returns 255] | |
| 147 | + | |
| 148 | +[test_bcheck_129] | |
| 149 | +112_backtrace.c:165: at main: BCHECK: overlapping regions ........(0x?), ........(0x?) in strncat | |
| 150 | +[returns 255] | |
| 151 | + | |
| 152 | +[test_bcheck_130] | |
| 153 | +112_backtrace.c:167: at main: BCHECK: invalid pointer ........, size 0x? in strchr | |
| 154 | +[returns 255] | |
| 155 | + | |
| 156 | +[test_bcheck_131] | |
| 157 | +112_backtrace.c:169: at main: BCHECK: invalid pointer ........, size 0x? in strrchr | |
| 158 | +[returns 255] | |
| 159 | + | |
| 160 | +[test_bcheck_132] | |
| 161 | +112_backtrace.c:171: at main: BCHECK: invalid pointer ........, size 0x? in strdup | |
| 142 | 162 | [returns 255] |
| @@ -60,12 +60,20 @@ main (void) · 59 unmodified lines | ||
| 60 | 60 | r = (__builtin_memcmp (p, str, sizeof(str))); |
| 61 | 61 | printf(" 11:%d", !r); |
| 62 | 62 | |
| 63 | − r = (__builtin_strchr(p, 'z') != &p[25]); | |
| 63 | + tmp[0] = '\0'; | |
| 64 | + p = __builtin_strncat(tmp, str, __builtin_strlen(str)); | |
| 65 | + r = (__builtin_memcmp (p, str, sizeof(str))); | |
| 64 | 66 | printf(" 12:%d", !r); |
| 65 | 67 | |
| 68 | + r = (__builtin_strchr(p, 'z') != &p[25]); | |
| 69 | + printf(" 13:%d", !r); | |
| 70 | + | |
| 71 | + r = (__builtin_strrchr(p, 'z') != &p[25]); | |
| 72 | + printf(" 14:%d", !r); | |
| 73 | + | |
| 66 | 74 | p = __builtin_strdup (str); |
| 67 | 75 | r = (__builtin_memcmp (p, str, sizeof(str))); |
| 68 | − printf(" 13:%d", !r); | |
| 76 | + printf(" 15:%d", !r); | |
| 69 | 77 | __builtin_free(p); |
| 70 | 78 | |
| 71 | 79 | p = __builtin_malloc (100); |
| @@ -1,4 +1,4 @@ | ||
| 1 | 1 | BOUNDS OFF: |
| 2 | − 1:1 2:1 3:1 4:1 5:1 6:1 7:1 8:1 9:1 10:1 11:1 12:1 13:1 | |
| 2 | + 1:1 2:1 3:1 4:1 5:1 6:1 7:1 8:1 9:1 10:1 11:1 12:1 13:1 14:1 15:1 | |
| 3 | 3 | BOUNDS ON: |
| 4 | − 1:1 2:1 3:1 4:1 5:1 6:1 7:1 8:1 9:1 10:1 11:1 12:1 13:1 | |
| 4 | + 1:1 2:1 3:1 4:1 5:1 6:1 7:1 8:1 9:1 10:1 11:1 12:1 13:1 14:1 15:1 | |