| 329 | } |
| 330 | |
| 331 | static bool gic_invalid_open(unsigned kind) { |
| 332 | cbm_ignore_checked_limits_t limits = gic_limits(); |
| 333 | if (kind == 0) |
| 334 | limits.max_bytes = 0; |
| 335 | if (kind == 1) |
| 336 | limits.max_work = 0; |
| 337 | if (kind == 2) |
| 338 | limits.max_patterns = 0; |
| 339 | if (kind == 3) |
| 340 | limits.max_arena_bytes = 0; |
| 341 | if (kind == 4) |
| 342 | limits.max_depth = 0; |
| 343 | if (kind == 5) |
| 344 | limits.max_depth = CBM_IGNORE_CHECKED_DEPTH_MAX + 1; |
| 345 | if (kind == 6) |
| 346 | limits.max_patterns = (size_t)INT_MAX + 1; |
| 347 | cbm_ignore_checked_t *owner = NULL; |
| 348 | cbm_ignore_checked_error_t error; |
| 349 | cbm_ignore_checked_status_t status = |
| 350 | cbm_ignore_checked_open(kind == 7 ? NULL : &limits, kind == 8 ? NULL : &owner, &error); |
| 351 | bool ok = gic_status(status, CBM_IGNORE_CHECKED_INVALID, &error) && !owner; |
| 352 | cbm_ignore_checked_free(owner); |
| 353 | return ok; |
| 354 | } |
| 355 | |
| 356 | static bool gic_optional_errors(cbm_ignore_checked_t *retained) { |
| 357 | cbm_ignore_checked_t *owner = NULL; |
no test coverage detected