Skip to content
This repository was archived by the owner on Oct 3, 2021. It is now read-only.

Commit 131eb49

Browse files
committed
Fixing more undef behaviors
1 parent f080a96 commit 131eb49

25 files changed

+45
-45
lines changed

c/aws-c-common/aws_array_eq_c_str_harness.i

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9112,7 +9112,7 @@ void aws_common_fatal_assert_library_initialized(void) {
91129112
void aws_array_eq_c_str_harness() {
91139113

91149114
void *array;
9115-
size_t array_len;
9115+
size_t array_len = __VERIFIER_nondet_ulong();
91169116
assume_abort_if_not(array_len <= 10);
91179117
array = can_fail_malloc(array_len);
91189118
const char *c_str = nondet_bool() ?

c/aws-c-common/aws_array_eq_c_str_ignore_case_harness.i

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9111,7 +9111,7 @@ void aws_common_fatal_assert_library_initialized(void) {
91119111
}
91129112
void aws_array_eq_c_str_ignore_case_harness() {
91139113

9114-
size_t array_len;
9114+
size_t array_len = __VERIFIER_nondet_ulong();
91159115
assume_abort_if_not(array_len <= 10);
91169116
void *array = can_fail_malloc(array_len);
91179117
const char *c_str = nondet_bool() ?

c/aws-c-common/aws_array_eq_harness.i

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9111,12 +9111,12 @@ void aws_common_fatal_assert_library_initialized(void) {
91119111
}
91129112
void aws_array_eq_harness() {
91139113

9114-
size_t lhs_len;
9114+
size_t lhs_len = __VERIFIER_nondet_ulong();
91159115
assume_abort_if_not(lhs_len <= 10);
91169116
void *lhs = can_fail_malloc(lhs_len);
91179117

91189118
void *rhs;
9119-
size_t rhs_len;
9119+
size_t rhs_len = __VERIFIER_nondet_ulong();
91209120
if (nondet_bool()) {
91219121
rhs_len = lhs_len;
91229122
rhs = lhs;

c/aws-c-common/aws_array_eq_ignore_case_harness.i

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9111,12 +9111,12 @@ void aws_common_fatal_assert_library_initialized(void) {
91119111
}
91129112
void aws_array_eq_ignore_case_harness() {
91139113

9114-
size_t lhs_len;
9114+
size_t lhs_len = __VERIFIER_nondet_ulong();
91159115
assume_abort_if_not(lhs_len <= 10);
91169116
void *lhs = can_fail_malloc(lhs_len);
91179117

91189118
void *rhs;
9119-
size_t rhs_len;
9119+
size_t rhs_len = __VERIFIER_nondet_ulong();
91209120
if (nondet_bool()) {
91219121
rhs_len = lhs_len;
91229122
rhs = lhs;

c/aws-c-common/aws_array_list_comparator_string_harness.i

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9881,10 +9881,10 @@ void aws_array_list_comparator_string_harness() {
98819881
struct aws_string *str_b = nondet_bool() ? str_a : ensure_string_is_allocated_bounded_length(16);
98829882

98839883
_Bool
9884-
nondet_parameter_a;
9884+
nondet_parameter_a = nondet_bool();
98859885

98869886
_Bool
9887-
nondet_parameter_b;
9887+
nondet_parameter_b = nondet_bool();
98889888
if (aws_array_list_comparator_string(nondet_parameter_a ? &str_a :
98899889
((void *)0)
98909890
, nondet_parameter_b ? &str_b :

c/aws-c-common/aws_byte_buf_advance_harness.i

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9112,9 +9112,9 @@ void aws_common_fatal_assert_library_initialized(void) {
91129112
}
91139113
void aws_byte_buf_advance_harness() {
91149114

9115-
struct aws_byte_buf buf;
9116-
struct aws_byte_buf output;
9117-
size_t len;
9115+
struct aws_byte_buf buf = {__VERIFIER_nondet_ulong(), 0, __VERIFIER_nondet_ulong(), 0};
9116+
struct aws_byte_buf output = {__VERIFIER_nondet_ulong(), 0, __VERIFIER_nondet_ulong(), 0};
9117+
size_t len = __VERIFIER_nondet_ulong();
91189118

91199119

91209120
assume_abort_if_not(aws_byte_buf_is_bounded(&buf, 40));

c/aws-c-common/aws_byte_buf_cat_harness.i

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9111,10 +9111,10 @@ void aws_common_fatal_assert_library_initialized(void) {
91119111
}
91129112
void aws_byte_buf_cat_harness() {
91139113

9114-
struct aws_byte_buf buffer1;
9115-
struct aws_byte_buf buffer2;
9116-
struct aws_byte_buf buffer3;
9117-
struct aws_byte_buf dest;
9114+
struct aws_byte_buf buffer1 = {__VERIFIER_nondet_ulong(), 0, __VERIFIER_nondet_ulong(), 0};
9115+
struct aws_byte_buf buffer2 = {__VERIFIER_nondet_ulong(), 0, __VERIFIER_nondet_ulong(), 0};
9116+
struct aws_byte_buf buffer3 = {__VERIFIER_nondet_ulong(), 0, __VERIFIER_nondet_ulong(), 0};
9117+
struct aws_byte_buf dest = {__VERIFIER_nondet_ulong(), 0, __VERIFIER_nondet_ulong(), 0};
91189118
size_t number_of_args = 3;
91199119

91209120

c/aws-c-common/aws_byte_buf_eq_c_str_harness.i

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9111,7 +9111,7 @@ void aws_common_fatal_assert_library_initialized(void) {
91119111
}
91129112
void aws_byte_buf_eq_c_str_harness() {
91139113

9114-
struct aws_byte_buf buf;
9114+
struct aws_byte_buf buf = {__VERIFIER_nondet_ulong(), 0, __VERIFIER_nondet_ulong(), 0};
91159115
const char *c_str = ensure_c_str_is_allocated(10);
91169116

91179117

c/aws-c-common/aws_byte_buf_eq_c_str_ignore_case_harness.i

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9111,7 +9111,7 @@ void aws_common_fatal_assert_library_initialized(void) {
91119111
}
91129112
void aws_byte_buf_eq_c_str_ignore_case_harness() {
91139113

9114-
struct aws_byte_buf buf;
9114+
struct aws_byte_buf buf = {__VERIFIER_nondet_ulong(), 0, __VERIFIER_nondet_ulong(), 0};
91159115
const char *c_str = ensure_c_str_is_allocated(10);
91169116

91179117

c/aws-c-common/aws_byte_buf_write_from_whole_string_harness.i

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9880,7 +9880,7 @@ void aws_byte_buf_write_from_whole_string_harness() {
98809880
struct aws_string *str = nondet_bool() ? ensure_string_is_allocated_bounded_length(16) :
98819881
((void *)0)
98829882
;
9883-
struct aws_byte_buf buf;
9883+
struct aws_byte_buf buf = {__VERIFIER_nondet_ulong(), 0, __VERIFIER_nondet_ulong(), 0};
98849884

98859885
ensure_byte_buf_has_allocated_buffer_member(&buf);
98869886
assume_abort_if_not(aws_byte_buf_is_valid(&buf));

0 commit comments

Comments
 (0)