From c5a489d7f82535a70488dd4f9e40e79f32a7fb2f Mon Sep 17 00:00:00 2001 From: peter Date: Sun, 4 Oct 2026 17:04:28 +0000 Subject: Fix the crashes found by the fuzzer so far. I really need to think of a better way to store those crash inputs. FossilOrigin-Name: a8b84fbc85ec0b472aca930d2d0af27949b39940317114cc37d37044bf1975d5 --- src/lib/aplwc_internal.h | 1 + src/lib/memory.c | 12 +++--- src/lib/module.c | 2 - src/lib/string.c | 8 +++- src/lib/syntax.c | 86 ++++++++++++++++++----------------------- tests/fuzz-crashes/1.fuzz | 2 - tests/fuzz-crashes/10.fuzz | 3 -- tests/fuzz-crashes/100.fuzz | Bin 49 -> 0 bytes tests/fuzz-crashes/101.fuzz | 1 - tests/fuzz-crashes/102.fuzz | Bin 33 -> 0 bytes tests/fuzz-crashes/103.fuzz | 1 - tests/fuzz-crashes/104.fuzz | 1 - tests/fuzz-crashes/105.fuzz | 1 - tests/fuzz-crashes/106.fuzz | 1 - tests/fuzz-crashes/107.fuzz | 1 - tests/fuzz-crashes/108.fuzz | 1 - tests/fuzz-crashes/109.fuzz | 1 - tests/fuzz-crashes/11.fuzz | 7 ---- tests/fuzz-crashes/110.fuzz | Bin 81 -> 0 bytes tests/fuzz-crashes/111.fuzz | 5 --- tests/fuzz-crashes/12.fuzz | 8 ---- tests/fuzz-crashes/13.fuzz | 5 --- tests/fuzz-crashes/14.fuzz | 5 --- tests/fuzz-crashes/15.fuzz | 5 --- tests/fuzz-crashes/16.fuzz | Bin 64 -> 0 bytes tests/fuzz-crashes/17.fuzz | 6 --- tests/fuzz-crashes/18.fuzz | 5 --- tests/fuzz-crashes/19.fuzz | 1 - tests/fuzz-crashes/2.fuzz | 3 -- tests/fuzz-crashes/20.fuzz | 19 --------- tests/fuzz-crashes/21.fuzz | 18 --------- tests/fuzz-crashes/22.fuzz | 40 ------------------- tests/fuzz-crashes/23.fuzz | 26 ------------- tests/fuzz-crashes/24.fuzz | Bin 101 -> 0 bytes tests/fuzz-crashes/25.fuzz | Bin 84 -> 0 bytes tests/fuzz-crashes/26.fuzz | 11 ------ tests/fuzz-crashes/27.fuzz | 7 ---- tests/fuzz-crashes/28.fuzz | Bin 105 -> 0 bytes tests/fuzz-crashes/29.fuzz | 1 - tests/fuzz-crashes/3.fuzz | 3 -- tests/fuzz-crashes/30.fuzz | 42 -------------------- tests/fuzz-crashes/31.fuzz | Bin 108 -> 0 bytes tests/fuzz-crashes/32.fuzz | Bin 97 -> 0 bytes tests/fuzz-crashes/33.fuzz | Bin 34 -> 0 bytes tests/fuzz-crashes/34.fuzz | Bin 95 -> 0 bytes tests/fuzz-crashes/35.fuzz | Bin 128 -> 0 bytes tests/fuzz-crashes/36.fuzz | Bin 90 -> 0 bytes tests/fuzz-crashes/37.fuzz | Bin 140 -> 0 bytes tests/fuzz-crashes/38.fuzz | 2 - tests/fuzz-crashes/39.fuzz | 3 -- tests/fuzz-crashes/4.fuzz | 3 -- tests/fuzz-crashes/40.fuzz | 3 -- tests/fuzz-crashes/41.fuzz | 4 -- tests/fuzz-crashes/42.fuzz | Bin 39 -> 0 bytes tests/fuzz-crashes/43.fuzz | 5 --- tests/fuzz-crashes/44.fuzz | 3 -- tests/fuzz-crashes/45.fuzz | 1 - tests/fuzz-crashes/46.fuzz | 1 - tests/fuzz-crashes/47.fuzz | 3 -- tests/fuzz-crashes/48.fuzz | Bin 20 -> 0 bytes tests/fuzz-crashes/49.fuzz | 5 --- tests/fuzz-crashes/5.fuzz | 5 --- tests/fuzz-crashes/50.fuzz | 3 -- tests/fuzz-crashes/51.fuzz | 9 ----- tests/fuzz-crashes/52.fuzz | 2 - tests/fuzz-crashes/53.fuzz | 3 -- tests/fuzz-crashes/54.fuzz | Bin 67 -> 0 bytes tests/fuzz-crashes/55.fuzz | 1 - tests/fuzz-crashes/56.fuzz | 3 -- tests/fuzz-crashes/57.fuzz | 2 - tests/fuzz-crashes/58.fuzz | Bin 85 -> 0 bytes tests/fuzz-crashes/59.fuzz | Bin 69 -> 0 bytes tests/fuzz-crashes/6.fuzz | 5 --- tests/fuzz-crashes/60.fuzz | 30 -------------- tests/fuzz-crashes/61.fuzz | Bin 34 -> 0 bytes tests/fuzz-crashes/62.fuzz | 39 ------------------- tests/fuzz-crashes/63.fuzz | 5 --- tests/fuzz-crashes/64.fuzz | Bin 139 -> 0 bytes tests/fuzz-crashes/65.fuzz | 32 --------------- tests/fuzz-crashes/66.fuzz | Bin 15 -> 0 bytes tests/fuzz-crashes/67.fuzz | Bin 188 -> 0 bytes tests/fuzz-crashes/68.fuzz | 40 ------------------- tests/fuzz-crashes/69.fuzz | 7 ---- tests/fuzz-crashes/7.fuzz | 7 ---- tests/fuzz-crashes/70.fuzz | 4 -- tests/fuzz-crashes/71.fuzz | 1 - tests/fuzz-crashes/72.fuzz | Bin 133 -> 0 bytes tests/fuzz-crashes/73.fuzz | 7 ---- tests/fuzz-crashes/74.fuzz | Bin 162 -> 0 bytes tests/fuzz-crashes/75.fuzz | 23 ----------- tests/fuzz-crashes/76.fuzz | 15 ------- tests/fuzz-crashes/77.fuzz | 34 ---------------- tests/fuzz-crashes/78.fuzz | 3 -- tests/fuzz-crashes/79.fuzz | 3 -- tests/fuzz-crashes/8.fuzz | Bin 20 -> 0 bytes tests/fuzz-crashes/80.fuzz | 3 -- tests/fuzz-crashes/81.fuzz | 5 --- tests/fuzz-crashes/82.fuzz | 7 ---- tests/fuzz-crashes/83.fuzz | 5 --- tests/fuzz-crashes/84.fuzz | 4 -- tests/fuzz-crashes/85.fuzz | 1 - tests/fuzz-crashes/86.fuzz | 3 -- tests/fuzz-crashes/87.fuzz | 6 --- tests/fuzz-crashes/88.fuzz | 5 --- tests/fuzz-crashes/89.fuzz | 7 ---- tests/fuzz-crashes/9.fuzz | 5 --- tests/fuzz-crashes/90.fuzz | 1 - tests/fuzz-crashes/91.fuzz | 1 - tests/fuzz-crashes/92.fuzz | 5 --- tests/fuzz-crashes/93.fuzz | 3 -- tests/fuzz-crashes/94.fuzz | 3 -- tests/fuzz-crashes/95.fuzz | 1 - tests/fuzz-crashes/96.fuzz | 1 - tests/fuzz-crashes/97.fuzz | Bin 70 -> 0 bytes tests/fuzz-crashes/98.fuzz | 2 - tests/fuzz-crashes/99.fuzz | 3 -- tests/fuzz-crashes/Makefile.am | 1 - tools/fuzz | 4 +- 118 files changed, 52 insertions(+), 679 deletions(-) delete mode 100644 tests/fuzz-crashes/1.fuzz delete mode 100644 tests/fuzz-crashes/10.fuzz delete mode 100644 tests/fuzz-crashes/100.fuzz delete mode 100644 tests/fuzz-crashes/101.fuzz delete mode 100644 tests/fuzz-crashes/102.fuzz delete mode 100644 tests/fuzz-crashes/103.fuzz delete mode 100644 tests/fuzz-crashes/104.fuzz delete mode 100644 tests/fuzz-crashes/105.fuzz delete mode 100644 tests/fuzz-crashes/106.fuzz delete mode 100644 tests/fuzz-crashes/107.fuzz delete mode 100644 tests/fuzz-crashes/108.fuzz delete mode 100644 tests/fuzz-crashes/109.fuzz delete mode 100644 tests/fuzz-crashes/11.fuzz delete mode 100644 tests/fuzz-crashes/110.fuzz delete mode 100644 tests/fuzz-crashes/111.fuzz delete mode 100644 tests/fuzz-crashes/12.fuzz delete mode 100644 tests/fuzz-crashes/13.fuzz delete mode 100644 tests/fuzz-crashes/14.fuzz delete mode 100644 tests/fuzz-crashes/15.fuzz delete mode 100644 tests/fuzz-crashes/16.fuzz delete mode 100644 tests/fuzz-crashes/17.fuzz delete mode 100644 tests/fuzz-crashes/18.fuzz delete mode 100644 tests/fuzz-crashes/19.fuzz delete mode 100644 tests/fuzz-crashes/2.fuzz delete mode 100644 tests/fuzz-crashes/20.fuzz delete mode 100644 tests/fuzz-crashes/21.fuzz delete mode 100644 tests/fuzz-crashes/22.fuzz delete mode 100644 tests/fuzz-crashes/23.fuzz delete mode 100644 tests/fuzz-crashes/24.fuzz delete mode 100644 tests/fuzz-crashes/25.fuzz delete mode 100644 tests/fuzz-crashes/26.fuzz delete mode 100644 tests/fuzz-crashes/27.fuzz delete mode 100644 tests/fuzz-crashes/28.fuzz delete mode 100644 tests/fuzz-crashes/29.fuzz delete mode 100644 tests/fuzz-crashes/3.fuzz delete mode 100644 tests/fuzz-crashes/30.fuzz delete mode 100644 tests/fuzz-crashes/31.fuzz delete mode 100644 tests/fuzz-crashes/32.fuzz delete mode 100644 tests/fuzz-crashes/33.fuzz delete mode 100644 tests/fuzz-crashes/34.fuzz delete mode 100644 tests/fuzz-crashes/35.fuzz delete mode 100644 tests/fuzz-crashes/36.fuzz delete mode 100644 tests/fuzz-crashes/37.fuzz delete mode 100644 tests/fuzz-crashes/38.fuzz delete mode 100644 tests/fuzz-crashes/39.fuzz delete mode 100644 tests/fuzz-crashes/4.fuzz delete mode 100644 tests/fuzz-crashes/40.fuzz delete mode 100644 tests/fuzz-crashes/41.fuzz delete mode 100644 tests/fuzz-crashes/42.fuzz delete mode 100644 tests/fuzz-crashes/43.fuzz delete mode 100644 tests/fuzz-crashes/44.fuzz delete mode 100644 tests/fuzz-crashes/45.fuzz delete mode 100644 tests/fuzz-crashes/46.fuzz delete mode 100644 tests/fuzz-crashes/47.fuzz delete mode 100644 tests/fuzz-crashes/48.fuzz delete mode 100644 tests/fuzz-crashes/49.fuzz delete mode 100644 tests/fuzz-crashes/5.fuzz delete mode 100644 tests/fuzz-crashes/50.fuzz delete mode 100644 tests/fuzz-crashes/51.fuzz delete mode 100644 tests/fuzz-crashes/52.fuzz delete mode 100644 tests/fuzz-crashes/53.fuzz delete mode 100644 tests/fuzz-crashes/54.fuzz delete mode 100644 tests/fuzz-crashes/55.fuzz delete mode 100644 tests/fuzz-crashes/56.fuzz delete mode 100644 tests/fuzz-crashes/57.fuzz delete mode 100644 tests/fuzz-crashes/58.fuzz delete mode 100644 tests/fuzz-crashes/59.fuzz delete mode 100644 tests/fuzz-crashes/6.fuzz delete mode 100644 tests/fuzz-crashes/60.fuzz delete mode 100644 tests/fuzz-crashes/61.fuzz delete mode 100644 tests/fuzz-crashes/62.fuzz delete mode 100644 tests/fuzz-crashes/63.fuzz delete mode 100644 tests/fuzz-crashes/64.fuzz delete mode 100644 tests/fuzz-crashes/65.fuzz delete mode 100644 tests/fuzz-crashes/66.fuzz delete mode 100644 tests/fuzz-crashes/67.fuzz delete mode 100644 tests/fuzz-crashes/68.fuzz delete mode 100644 tests/fuzz-crashes/69.fuzz delete mode 100644 tests/fuzz-crashes/7.fuzz delete mode 100644 tests/fuzz-crashes/70.fuzz delete mode 100644 tests/fuzz-crashes/71.fuzz delete mode 100644 tests/fuzz-crashes/72.fuzz delete mode 100644 tests/fuzz-crashes/73.fuzz delete mode 100644 tests/fuzz-crashes/74.fuzz delete mode 100644 tests/fuzz-crashes/75.fuzz delete mode 100644 tests/fuzz-crashes/76.fuzz delete mode 100644 tests/fuzz-crashes/77.fuzz delete mode 100644 tests/fuzz-crashes/78.fuzz delete mode 100644 tests/fuzz-crashes/79.fuzz delete mode 100644 tests/fuzz-crashes/8.fuzz delete mode 100644 tests/fuzz-crashes/80.fuzz delete mode 100644 tests/fuzz-crashes/81.fuzz delete mode 100644 tests/fuzz-crashes/82.fuzz delete mode 100644 tests/fuzz-crashes/83.fuzz delete mode 100644 tests/fuzz-crashes/84.fuzz delete mode 100644 tests/fuzz-crashes/85.fuzz delete mode 100644 tests/fuzz-crashes/86.fuzz delete mode 100644 tests/fuzz-crashes/87.fuzz delete mode 100644 tests/fuzz-crashes/88.fuzz delete mode 100644 tests/fuzz-crashes/89.fuzz delete mode 100644 tests/fuzz-crashes/9.fuzz delete mode 100644 tests/fuzz-crashes/90.fuzz delete mode 100644 tests/fuzz-crashes/91.fuzz delete mode 100644 tests/fuzz-crashes/92.fuzz delete mode 100644 tests/fuzz-crashes/93.fuzz delete mode 100644 tests/fuzz-crashes/94.fuzz delete mode 100644 tests/fuzz-crashes/95.fuzz delete mode 100644 tests/fuzz-crashes/96.fuzz delete mode 100644 tests/fuzz-crashes/97.fuzz delete mode 100644 tests/fuzz-crashes/98.fuzz delete mode 100644 tests/fuzz-crashes/99.fuzz diff --git a/src/lib/aplwc_internal.h b/src/lib/aplwc_internal.h index ca7e719..148fd58 100644 --- a/src/lib/aplwc_internal.h +++ b/src/lib/aplwc_internal.h @@ -163,6 +163,7 @@ int valid_ref(struct aplwc_ref *); #define MEMPTRS_EXIT(aplwc) memptrs_remove(aplwc, &memptrs_frame) /* string.c */ +#define INVALID_CHAR UINT32_MAX struct string *chars_to_string(struct aplwc *, const char *, int len); uint32_t string_char(struct string *, size_t); size_t char_length(struct string *, size_t); diff --git a/src/lib/memory.c b/src/lib/memory.c index a8317c7..006c409 100644 --- a/src/lib/memory.c +++ b/src/lib/memory.c @@ -441,8 +441,7 @@ compact(struct aplwc *aplwc) static void * alloc(struct aplwc *aplwc, size_t size, enum chunk_tag tag) { - struct chunk *free; - struct chunk *new; + struct chunk *free, *new; size_t pad; int attempt; @@ -454,7 +453,7 @@ alloc(struct aplwc *aplwc, size_t size, enum chunk_tag tag) attempt = 0; retry: DEBUG(check_mem(aplwc)); - free = FAILCASE(find_free(aplwc, size), NULL); + new = free = FAILCASE(find_free(aplwc, size), NULL); if(!free){ switch(attempt++){ case 0: @@ -469,14 +468,12 @@ retry: /* fall-through */ default: aplwc->last_error = APLWC_OUT_OF_MEMORY; - return NULL; + goto end; } } assert(free->tag == CHUNK_TAG_FREE); - new = free; - if(free->size > (size + 2*HEADER_SIZE)){ free = (struct chunk *)(((uint8_t*)free) + HEADER_SIZE + size); free->tag = CHUNK_TAG_FREE; @@ -496,8 +493,9 @@ retry: new->tag = tag; new->reachable = aplwc->reachable_bit; +end: DEBUG(check_mem(aplwc)); - return data(new); + return new ? data(new) : NULL; } void diff --git a/src/lib/module.c b/src/lib/module.c index 9c2cbc2..22b8eac 100644 --- a/src/lib/module.c +++ b/src/lib/module.c @@ -28,8 +28,6 @@ add_member(struct aplwc *aplwc, struct aplwc_module *module, symbol_t name, stru for(m = module->members; m; m = m->link){ if(m->name == name){ - if(real_member) - assert(m->real_member == NULL || m->real_member == real_member); m->real_member = real_member; m->exported |= export; goto end; diff --git a/src/lib/string.c b/src/lib/string.c index 4101b80..0c01fca 100644 --- a/src/lib/string.c +++ b/src/lib/string.c @@ -104,6 +104,10 @@ string_char(struct string *string, size_t offset) uint32_t c; size_t len, i; + assert(offset <= string->bytes); + if(offset == string->bytes) + return INVALID_CHAR; + c = 0; len = char_length(string, offset); switch(char_length(string, offset)){ @@ -134,8 +138,8 @@ char_length(struct string *string, size_t offset) { uint8_t b; - if(offset >= string->bytes) - return 0; + assert(offset < string->bytes); + b = string->utf8[offset]; assert(!((b & 0xC0) == 0x80)); diff --git a/src/lib/syntax.c b/src/lib/syntax.c index 3354050..5b60fac 100644 --- a/src/lib/syntax.c +++ b/src/lib/syntax.c @@ -56,8 +56,10 @@ peek(struct scan_state *state) static uint32_t advance(struct scan_state *state) { - state->offset += char_length(*state->text, state->offset); - state->skip_number_and_identifier = 0; + if(peek(state) != INVALID_CHAR){ + state->offset += char_length(*state->text, state->offset); + state->skip_number_and_identifier = 0; + } return peek(state); } @@ -81,7 +83,7 @@ skip_space(struct scan_state *state) #define T tokens->tokens[token_index] static enum aplwc_rc -single_sym(struct scan_state *state, struct token_list *tokens, size_t token_index, int check_only) +single_sym(struct scan_state *state, struct token_list *tokens, size_t token_index) { uint32_t c; size_t start; @@ -110,11 +112,9 @@ single_sym(struct scan_state *state, struct token_list *tokens, size_t token_ind goto end; } T.tag = TOKEN_TAG_UNKNOWN_SYM; - if(!check_only){ - if((rc = newsym(state, start, 1, &sym)) != APLWC_OK) - goto end; - T.data.symbol = sym; - } + if((rc = newsym(state, start, 1, &sym)) != APLWC_OK) + goto end; + T.data.symbol = sym; break; } @@ -125,7 +125,7 @@ end: } static enum aplwc_rc -identifier(struct scan_state *state, struct token_list *tokens, size_t token_index, int check_only) +identifier(struct scan_state *state, struct token_list *tokens, size_t token_index) { uint32_t c; size_t start, len; @@ -148,11 +148,9 @@ identifier(struct scan_state *state, struct token_list *tokens, size_t token_ind }while(is_id_continue(c)); T.tag = TOKEN_TAG_IDENTIFIER; - if(!check_only){ - if((rc = newsym(state, start, len, &sym)) != APLWC_OK) - goto end; - T.data.symbol = sym; - } + if((rc = newsym(state, start, len, &sym)) != APLWC_OK) + goto end; + T.data.symbol = sym; state->skip_number_and_identifier = 1; rc = APLWC_OK; @@ -162,7 +160,7 @@ end: } static enum aplwc_rc -keyword(struct scan_state *state, struct token_list *tokens, size_t token_index, int check_only) +keyword(struct scan_state *state, struct token_list *tokens, size_t token_index) { uint32_t c; size_t start, len; @@ -180,35 +178,30 @@ keyword(struct scan_state *state, struct token_list *tokens, size_t token_index, c = advance(state); start = state->offset; - len = 0; - do{ - c = advance(state); + for(len = 0; is_id_continue(c); c = advance(state)) len++; - }while(is_id_continue(c)); rc = APLWC_OK; T.tag = TOKEN_TAG_KEYWORD; - if(!check_only){ - if((rc = newsym(state, start, len, &sym)) != APLWC_OK) - goto end; + if((rc = newsym(state, start, len, &sym)) != APLWC_OK) + goto end; - for(kw = 0; kw < N_KWDS; kw++){ - if(sym == state->aplwc->keyword_symbols[kw]){ - T.data.keyword = kw; - break; - } + for(kw = 0; kw < N_KWDS; kw++){ + if(sym == state->aplwc->keyword_symbols[kw]){ + T.data.keyword = kw; + break; } - if(kw == N_KWDS) - rc = APLWC_INVALID_SYNTAX; - } + if(kw == N_KWDS) + rc = APLWC_INVALID_SYNTAX; + end: MEMPTRS_EXIT(state->aplwc); return rc; } static enum aplwc_rc -number(struct scan_state *state, struct token_list *tokens, size_t token_index, int check_only) +number(struct scan_state *state, struct token_list *tokens, size_t token_index) { uint32_t c; int has_digits; @@ -217,8 +210,6 @@ number(struct scan_state *state, struct token_list *tokens, size_t token_index, MEMPTRS(state->aplwc, 1); MEMPTR(0, tokens); - UNUSED_PARAMETER(check_only); - rc = APLWC_INVALID_SYNTAX; c = peek(state); @@ -260,7 +251,7 @@ end: } static enum aplwc_rc -text(struct scan_state *state, struct token_list *tokens, size_t token_index, int check_only) +text(struct scan_state *state, struct token_list *tokens, size_t token_index) { uint32_t c; enum aplwc_rc rc; @@ -268,8 +259,6 @@ text(struct scan_state *state, struct token_list *tokens, size_t token_index, in MEMPTRS(state->aplwc, 1); MEMPTR(0, tokens); - UNUSED_PARAMETER(check_only); - rc = APLWC_INVALID_SYNTAX;; c = peek(state); if(c != '\'') @@ -277,7 +266,7 @@ text(struct scan_state *state, struct token_list *tokens, size_t token_index, in do c = advance(state); - while((c != '\n') && (c != 0) && (c != '\'')); + while((c != '\n') && (c != INVALID_CHAR) && (c != '\'')); if(c == '\'') advance(state); @@ -292,7 +281,7 @@ end: } static enum aplwc_rc -comment(struct scan_state *state, struct token_list *tokens, size_t token_index, int check_only) +comment(struct scan_state *state, struct token_list *tokens, size_t token_index) { uint32_t c; enum aplwc_rc rc; @@ -300,8 +289,6 @@ comment(struct scan_state *state, struct token_list *tokens, size_t token_index, MEMPTRS(state->aplwc, 1); MEMPTR(0, tokens); - UNUSED_PARAMETER(check_only); - rc = APLWC_INVALID_SYNTAX; c = peek(state); if(c != 0x235D) @@ -319,11 +306,11 @@ end: } static enum aplwc_rc -next_token(struct scan_state *state, struct token_list *tokens, size_t token_index, int check_only) +next_token(struct scan_state *state, struct token_list *tokens, size_t token_index) { enum aplwc_rc rc; size_t i; - enum aplwc_rc (*scans[])(struct scan_state *, struct token_list *, size_t, int) = { + enum aplwc_rc (*scans[])(struct scan_state *, struct token_list *, size_t) = { identifier, keyword, number, @@ -338,12 +325,12 @@ next_token(struct scan_state *state, struct token_list *tokens, size_t token_ind T.start = state->offset; rc = APLWC_INVALID_SYNTAX; for(i = 0; (rc == APLWC_INVALID_SYNTAX) && (i < NELEM(scans)); i++){ - rc = scans[i](state, tokens, token_index, check_only); + rc = scans[i](state, tokens, token_index); switch(rc){ case APLWC_OK: break; case APLWC_INVALID_SYNTAX: - state->offset = tokens->tokens[token_index].start; + state->offset = T.start; break; default: goto end; @@ -374,11 +361,13 @@ check(struct aplwc *aplwc, struct string *text, size_t *n) goto end; } MEMPTR(1, tokens); + tokens->text = text; + tokens->length = 1; init_scan_state(&state, aplwc, &text); - for(count = 0; peek(&state); count++){ - ret = next_token(&state, tokens, 0, 1); + for(count = 0; peek(&state) != INVALID_CHAR; count++){ + ret = next_token(&state, tokens, 0); if(ret != APLWC_OK) goto end; } @@ -404,8 +393,9 @@ scan(struct aplwc *aplwc, struct string *text, struct token_list *tokens) init_scan_state(&state, aplwc, &text); ret = APLWC_OK; - for(count = 0; (ret == APLWC_OK) && peek(&state); count++){ - ret = next_token(&state, tokens, count, 0); + for(count = 0; (ret == APLWC_OK) && (peek(&state) != INVALID_CHAR); count++){ + assert(count < tokens->length); + ret = next_token(&state, tokens, count); } MEMPTRS_EXIT(aplwc); diff --git a/tests/fuzz-crashes/1.fuzz b/tests/fuzz-crashes/1.fuzz deleted file mode 100644 index b3f468a..0000000 --- a/tests/fuzz-crashes/1.fuzz +++ /dev/null @@ -1,2 +0,0 @@ -#!00000000000000 -:' diff --git a/tests/fuzz-crashes/10.fuzz b/tests/fuzz-crashes/10.fuzz deleted file mode 100644 index 0b5460a..0000000 --- a/tests/fuzz-crashes/10.fuzz +++ /dev/null @@ -1,3 +0,0 @@ - f00 0+00∇ - -∇:f diff --git a/tests/fuzz-crashes/100.fuzz b/tests/fuzz-crashes/100.fuzz deleted file mode 100644 index 39ea484..0000000 Binary files a/tests/fuzz-crashes/100.fuzz and /dev/null differ diff --git a/tests/fuzz-crashes/101.fuzz b/tests/fuzz-crashes/101.fuzz deleted file mode 100644 index f93337b..0000000 --- a/tests/fuzz-crashes/101.fuzz +++ /dev/null @@ -1 +0,0 @@ -:exdrt plusLLior........r......B.....r........4.....Onuj f \ No newline at end of file diff --git a/tests/fuzz-crashes/102.fuzz b/tests/fuzz-crashes/102.fuzz deleted file mode 100644 index 73cdea4..0000000 Binary files a/tests/fuzz-crashes/102.fuzz and /dev/null differ diff --git a/tests/fuzz-crashes/103.fuzz b/tests/fuzz-crashes/103.fuzz deleted file mode 100644 index ea2db22..0000000 --- a/tests/fuzz-crashes/103.fuzz +++ /dev/null @@ -1 +0,0 @@ -:export plus:exp æ0+++++++*++(t nsplus m minum mins0 f \ No newline at end of file diff --git a/tests/fuzz-crashes/104.fuzz b/tests/fuzz-crashes/104.fuzz deleted file mode 100644 index 7729b27..0000000 --- a/tests/fuzz-crashes/104.fuzz +++ /dev/null @@ -1 +0,0 @@ - f0000x00#!000:expotr plus linus f \ No newline at end of file diff --git a/tests/fuzz-crashes/105.fuzz b/tests/fuzz-crashes/105.fuzz deleted file mode 100644 index 04ccde3..0000000 --- a/tests/fuzz-crashes/105.fuzz +++ /dev/null @@ -1 +0,0 @@ -:expoort/plu0000000001#0 ¯0.0 f \ No newline at end of file diff --git a/tests/fuzz-crashes/106.fuzz b/tests/fuzz-crashes/106.fuzz deleted file mode 100644 index 7086bb8..0000000 --- a/tests/fuzz-crashes/106.fuzz +++ /dev/null @@ -1 +0,0 @@ -:expo!+ pjus mirt+++##-#>:##+###++++#+++++++++nu..0###9##-#>:##+###!s f \ No newline at end of file diff --git a/tests/fuzz-crashes/107.fuzz b/tests/fuzz-crashes/107.fuzz deleted file mode 100644 index af2a68a..0000000 --- a/tests/fuzz-crashes/107.fuzz +++ /dev/null @@ -1 +0,0 @@ -::::::::::::::::::::::export pjus mi!++++++++#+++++++++nu..0###9##-#>###+###!s f \ No newline at end of file diff --git a/tests/fuzz-crashes/108.fuzz b/tests/fuzz-crashes/108.fuzz deleted file mode 100644 index bfa2e21..0000000 --- a/tests/fuzz-crashes/108.fuzz +++ /dev/null @@ -1 +0,0 @@ -:exp.0#WWWWWWWWWWWWWWWWWWWWW##>##-#>##+++++++#+++++++++nuu..0###9##-#>##+###!s f \ No newline at end of file diff --git a/tests/fuzz-crashes/109.fuzz b/tests/fuzz-crashes/109.fuzz deleted file mode 100644 index c962ee1..0000000 --- a/tests/fuzz-crashes/109.fuzz +++ /dev/null @@ -1 +0,0 @@ -:::::::::::::::::::+++++#+++++++++nu..0###9##-#>###+###!s f \ No newline at end of file diff --git a/tests/fuzz-crashes/11.fuzz b/tests/fuzz-crashes/11.fuzz deleted file mode 100644 index 6133ee7..0000000 --- a/tests/fuzz-crashes/11.fuzz +++ /dev/null @@ -1,7 +0,0 @@ -#:00000000000000 - f00 x - ⎕←x+x -∇00 - -' -' diff --git a/tests/fuzz-crashes/110.fuzz b/tests/fuzz-crashes/110.fuzz deleted file mode 100644 index 207aef2..0000000 Binary files a/tests/fuzz-crashes/110.fuzz and /dev/null differ diff --git a/tests/fuzz-crashes/111.fuzz b/tests/fuzz-crashes/111.fuzz deleted file mode 100644 index ca5ea96..0000000 --- a/tests/fuzz-crashes/111.fuzz +++ /dev/null @@ -1,5 +0,0 @@ -:+@++(+@@L@@@@++++7+++(e000000000 - -'!0000000000000 - -xpo+@@@@@@@++++7+++(rts&f \ No newline at end of file diff --git a/tests/fuzz-crashes/12.fuzz b/tests/fuzz-crashes/12.fuzz deleted file mode 100644 index bef576e..0000000 --- a/tests/fuzz-crashes/12.fuzz +++ /dev/null @@ -1,8 +0,0 @@ -#!000000000000000 - -:exp000000000000 - -:module -ort plu æs 00 - -' diff --git a/tests/fuzz-crashes/13.fuzz b/tests/fuzz-crashes/13.fuzz deleted file mode 100644 index 0006719..0000000 --- a/tests/fuzz-crashes/13.fuzz +++ /dev/null @@ -1,5 +0,0 @@ -#0000 - -::::::::::us dxport plus 00 - -' diff --git a/tests/fuzz-crashes/14.fuzz b/tests/fuzz-crashes/14.fuzz deleted file mode 100644 index 2233b0d..0000000 --- a/tests/fuzz-crashes/14.fuzz +++ /dev/null @@ -1,5 +0,0 @@ -#!00000000-000000 -:exp.0000 -ort plus 00 - -' diff --git a/tests/fuzz-crashes/15.fuzz b/tests/fuzz-crashes/15.fuzz deleted file mode 100644 index 1978d4f..0000000 --- a/tests/fuzz-crashes/15.fuzz +++ /dev/null @@ -1,5 +0,0 @@ -#!000000000000000 - -::::::!00000000000000 - -'''''''. diff --git a/tests/fuzz-crashes/16.fuzz b/tests/fuzz-crashes/16.fuzz deleted file mode 100644 index 330570d..0000000 Binary files a/tests/fuzz-crashes/16.fuzz and /dev/null differ diff --git a/tests/fuzz-crashes/17.fuzz b/tests/fuzz-crashes/17.fuzz deleted file mode 100644 index 8e7d484..0000000 --- a/tests/fuzz-crashes/17.fuzz +++ /dev/null @@ -1,6 +0,0 @@ -#!000000000000000 - -:expo######" -####!0###########!0####################rt plus 00 - -' diff --git a/tests/fuzz-crashes/18.fuzz b/tests/fuzz-crashes/18.fuzz deleted file mode 100644 index 0c3ff83..0000000 --- a/tests/fuzz-crashes/18.fuzz +++ /dev/null @@ -1,5 +0,0 @@ -#9000 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@000000000000 - -:expoqt p@@@@@@@@@@@@@@@@@@@@lus 00 - -' diff --git a/tests/fuzz-crashes/19.fuzz b/tests/fuzz-crashes/19.fuzz deleted file mode 100644 index e47c9e4..0000000 --- a/tests/fuzz-crashes/19.fuzz +++ /dev/null @@ -1 +0,0 @@ - 0000000000000%000000000000000:1'0 \ No newline at end of file diff --git a/tests/fuzz-crashes/2.fuzz b/tests/fuzz-crashes/2.fuzz deleted file mode 100644 index 334fe5f..0000000 --- a/tests/fuzz-crashes/2.fuzz +++ /dev/null @@ -1,3 +0,0 @@ -:!00000000000000 - -' diff --git a/tests/fuzz-crashes/20.fuzz b/tests/fuzz-crashes/20.fuzz deleted file mode 100644 index 2010544..0000000 --- a/tests/fuzz-crashes/20.fuzz +++ /dev/null @@ -1,19 +0,0 @@ -#!000000000000000 - -:export pXus 0000 - -pp\ppppppppp' -00 - -0000 - -!000000000 - -:symbol plus -00 - -0000 - -!r)))0000000000 - -:symbo' diff --git a/tests/fuzz-crashes/21.fuzz b/tests/fuzz-crashes/21.fuzz deleted file mode 100644 index feedbd6..0000000 --- a/tests/fuzz-crashes/21.fuzz +++ /dev/null @@ -1,18 +0,0 @@ -#!000 - -:export pt #!00000000000000 - -' -#!s 000" - -pp\pppppppp0 - -:e00p' -00 - -000 - - -!r)F)000000000000 - -' diff --git a/tests/fuzz-crashes/22.fuzz b/tests/fuzz-crashes/22.fuzz deleted file mode 100644 index 8f73ef9..0000000 --- a/tests/fuzz-crashes/22.fuzz +++ /dev/null @@ -1,40 +0,0 @@ -#!000000000000000 - -: - - - - - - - - - - - - - - - - - - - -0 - - - - - - - - - -export pXus 0000 - -pp\pppppp]pp' -00 - -000000 - -' diff --git a/tests/fuzz-crashes/23.fuzz b/tests/fuzz-crashes/23.fuzz deleted file mode 100644 index 08fb8ef..0000000 --- a/tests/fuzz-crashes/23.fuzz +++ /dev/null @@ -1,26 +0,0 @@ -#!0000000000 - - - - - -00000 - -:exp00000000)) -0000 - -!r0000 -ort prt p#########<<<<000 - -pp\ppppppppp600 - -!r)))000 -00 - -0/ - -▇ 000000▇ 0 -' -0 - -' diff --git a/tests/fuzz-crashes/24.fuzz b/tests/fuzz-crashes/24.fuzz deleted file mode 100644 index 9cd485a..0000000 Binary files a/tests/fuzz-crashes/24.fuzz and /dev/null differ diff --git a/tests/fuzz-crashes/25.fuzz b/tests/fuzz-crashes/25.fuzz deleted file mode 100644 index 91146cb..0000000 Binary files a/tests/fuzz-crashes/25.fuzz and /dev/null differ diff --git a/tests/fuzz-crashes/26.fuzz b/tests/fuzz-crashes/26.fuzz deleted file mode 100644 index daba95c..0000000 --- a/tests/fuzz-crashes/26.fuzz +++ /dev/null @@ -1,11 +0,0 @@ -#!000000000000000 - -:export pre p#<<000000 - -:ex00 - -:expvrt prt p#########<<@0 - -!r)))000000000@00 - -' diff --git a/tests/fuzz-crashes/27.fuzz b/tests/fuzz-crashes/27.fuzz deleted file mode 100644 index fb7a5fc..0000000 --- a/tests/fuzz-crashes/27.fuzz +++ /dev/null @@ -1,7 +0,0 @@ -E!OOOO000000000 - -:e_porOOOOO%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%00000 - -:expo%%%%%us 00 - -' diff --git a/tests/fuzz-crashes/28.fuzz b/tests/fuzz-crashes/28.fuzz deleted file mode 100644 index 971b014..0000000 Binary files a/tests/fuzz-crashes/28.fuzz and /dev/null differ diff --git a/tests/fuzz-crashes/29.fuzz b/tests/fuzz-crashes/29.fuzz deleted file mode 100644 index 970ccc6..0000000 --- a/tests/fuzz-crashes/29.fuzz +++ /dev/null @@ -1 +0,0 @@ -:: \ No newline at end of file diff --git a/tests/fuzz-crashes/3.fuzz b/tests/fuzz-crashes/3.fuzz deleted file mode 100644 index aafbf74..0000000 --- a/tests/fuzz-crashes/3.fuzz +++ /dev/null @@ -1,3 +0,0 @@ -#:00000000000000 - -' diff --git a/tests/fuzz-crashes/30.fuzz b/tests/fuzz-crashes/30.fuzz deleted file mode 100644 index 48c3b16..0000000 --- a/tests/fuzz-crashes/30.fuzz +++ /dev/null @@ -1,42 +0,0 @@ -#!000000000000001 - -:e0000000010000000000001 - -:e0000000 - -:exporN!000 - - - - - - - - - - - -exc!000 - - - - - - - - - - - - - - - - - - -0000 - -!r)))000000000000 - -' diff --git a/tests/fuzz-crashes/31.fuzz b/tests/fuzz-crashes/31.fuzz deleted file mode 100644 index c49d136..0000000 Binary files a/tests/fuzz-crashes/31.fuzz and /dev/null differ diff --git a/tests/fuzz-crashes/32.fuzz b/tests/fuzz-crashes/32.fuzz deleted file mode 100644 index e352b4f..0000000 Binary files a/tests/fuzz-crashes/32.fuzz and /dev/null differ diff --git a/tests/fuzz-crashes/33.fuzz b/tests/fuzz-crashes/33.fuzz deleted file mode 100644 index e16c989..0000000 Binary files a/tests/fuzz-crashes/33.fuzz and /dev/null differ diff --git a/tests/fuzz-crashes/34.fuzz b/tests/fuzz-crashes/34.fuzz deleted file mode 100644 index fb4f1fd..0000000 Binary files a/tests/fuzz-crashes/34.fuzz and /dev/null differ diff --git a/tests/fuzz-crashes/35.fuzz b/tests/fuzz-crashes/35.fuzz deleted file mode 100644 index 95546ec..0000000 Binary files a/tests/fuzz-crashes/35.fuzz and /dev/null differ diff --git a/tests/fuzz-crashes/36.fuzz b/tests/fuzz-crashes/36.fuzz deleted file mode 100644 index 5c6db57..0000000 Binary files a/tests/fuzz-crashes/36.fuzz and /dev/null differ diff --git a/tests/fuzz-crashes/37.fuzz b/tests/fuzz-crashes/37.fuzz deleted file mode 100644 index aa7efbe..0000000 Binary files a/tests/fuzz-crashes/37.fuzz and /dev/null differ diff --git a/tests/fuzz-crashes/38.fuzz b/tests/fuzz-crashes/38.fuzz deleted file mode 100644 index b3f468a..0000000 --- a/tests/fuzz-crashes/38.fuzz +++ /dev/null @@ -1,2 +0,0 @@ -#!00000000000000 -:' diff --git a/tests/fuzz-crashes/39.fuzz b/tests/fuzz-crashes/39.fuzz deleted file mode 100644 index 334fe5f..0000000 --- a/tests/fuzz-crashes/39.fuzz +++ /dev/null @@ -1,3 +0,0 @@ -:!00000000000000 - -' diff --git a/tests/fuzz-crashes/4.fuzz b/tests/fuzz-crashes/4.fuzz deleted file mode 100644 index f3104fc..0000000 --- a/tests/fuzz-crashes/4.fuzz +++ /dev/null @@ -1,3 +0,0 @@ -!00000000000000 - -:sy \ No newline at end of file diff --git a/tests/fuzz-crashes/40.fuzz b/tests/fuzz-crashes/40.fuzz deleted file mode 100644 index aafbf74..0000000 --- a/tests/fuzz-crashes/40.fuzz +++ /dev/null @@ -1,3 +0,0 @@ -#:00000000000000 - -' diff --git a/tests/fuzz-crashes/41.fuzz b/tests/fuzz-crashes/41.fuzz deleted file mode 100644 index 3ad884c..0000000 --- a/tests/fuzz-crashes/41.fuzz +++ /dev/null @@ -1,4 +0,0 @@ -#000000 -0 -:s@mbol -' \ No newline at end of file diff --git a/tests/fuzz-crashes/42.fuzz b/tests/fuzz-crashes/42.fuzz deleted file mode 100644 index 82f171d..0000000 Binary files a/tests/fuzz-crashes/42.fuzz and /dev/null differ diff --git a/tests/fuzz-crashes/43.fuzz b/tests/fuzz-crashes/43.fuzz deleted file mode 100644 index 35e153b..0000000 --- a/tests/fuzz-crashes/43.fuzz +++ /dev/null @@ -1,5 +0,0 @@ -#!00000000#!00000000000000 - -:module000000 - -' diff --git a/tests/fuzz-crashes/44.fuzz b/tests/fuzz-crashes/44.fuzz deleted file mode 100644 index 60c14dd..0000000 --- a/tests/fuzz-crashes/44.fuzz +++ /dev/null @@ -1,3 +0,0 @@ -0:000000000/000 - -'' diff --git a/tests/fuzz-crashes/45.fuzz b/tests/fuzz-crashes/45.fuzz deleted file mode 100644 index 46a17b8..0000000 --- a/tests/fuzz-crashes/45.fuzz +++ /dev/null @@ -1 +0,0 @@ -#!00!0000000000000:0 \ No newline at end of file diff --git a/tests/fuzz-crashes/46.fuzz b/tests/fuzz-crashes/46.fuzz deleted file mode 100644 index 397db75..0000000 --- a/tests/fuzz-crashes/46.fuzz +++ /dev/null @@ -1 +0,0 @@ -: diff --git a/tests/fuzz-crashes/47.fuzz b/tests/fuzz-crashes/47.fuzz deleted file mode 100644 index 932bb92..0000000 --- a/tests/fuzz-crashes/47.fuzz +++ /dev/null @@ -1,3 +0,0 @@ -}}}}}}}}}}}}}}}}}}}}}}}}}00#!00000000:00000 - -' diff --git a/tests/fuzz-crashes/48.fuzz b/tests/fuzz-crashes/48.fuzz deleted file mode 100644 index acdba91..0000000 Binary files a/tests/fuzz-crashes/48.fuzz and /dev/null differ diff --git a/tests/fuzz-crashes/49.fuzz b/tests/fuzz-crashes/49.fuzz deleted file mode 100644 index 01fdf9e..0000000 --- a/tests/fuzz-crashes/49.fuzz +++ /dev/null @@ -1,5 +0,0 @@ -#!por00000.*0000000 - -:expor00000.*00000 - -' diff --git a/tests/fuzz-crashes/5.fuzz b/tests/fuzz-crashes/5.fuzz deleted file mode 100644 index d8e8a18..0000000 --- a/tests/fuzz-crashes/5.fuzz +++ /dev/null @@ -1,5 +0,0 @@ -00000000 - -:expo0 - -'% \ No newline at end of file diff --git a/tests/fuzz-crashes/50.fuzz b/tests/fuzz-crashes/50.fuzz deleted file mode 100644 index 4df9cbd..0000000 --- a/tests/fuzz-crashes/50.fuzz +++ /dev/null @@ -1,3 +0,0 @@ -#!0000%0#!00000000000000 - -:modøå \ No newline at end of file diff --git a/tests/fuzz-crashes/51.fuzz b/tests/fuzz-crashes/51.fuzz deleted file mode 100644 index cd4f48a..0000000 --- a/tests/fuzz-crashes/51.fuzz +++ /dev/null @@ -1,9 +0,0 @@ -#!00000000000#!00000000000000 - -:symb000 - -.0000/00 - - - -' diff --git a/tests/fuzz-crashes/52.fuzz b/tests/fuzz-crashes/52.fuzz deleted file mode 100644 index ef6d0c4..0000000 --- a/tests/fuzz-crashes/52.fuzz +++ /dev/null @@ -1,2 +0,0 @@ -" -:: \ No newline at end of file diff --git a/tests/fuzz-crashes/53.fuzz b/tests/fuzz-crashes/53.fuzz deleted file mode 100644 index 97efc04..0000000 --- a/tests/fuzz-crashes/53.fuzz +++ /dev/null @@ -1,3 +0,0 @@ -##ⱕ←000010000 - -###'000000:00000 diff --git a/tests/fuzz-crashes/54.fuzz b/tests/fuzz-crashes/54.fuzz deleted file mode 100644 index 091f1d0..0000000 Binary files a/tests/fuzz-crashes/54.fuzz and /dev/null differ diff --git a/tests/fuzz-crashes/55.fuzz b/tests/fuzz-crashes/55.fuzz deleted file mode 100644 index 73e4266..0000000 --- a/tests/fuzz-crashes/55.fuzz +++ /dev/null @@ -1 +0,0 @@ -#+++*++:$$$$$$$$$$$$$$$++!++$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$++!++++8+ \ No newline at end of file diff --git a/tests/fuzz-crashes/56.fuzz b/tests/fuzz-crashes/56.fuzz deleted file mode 100644 index 05a158f..0000000 --- a/tests/fuzz-crashes/56.fuzz +++ /dev/null @@ -1,3 +0,0 @@ -#+++*++$$$$000:0000'0:::::00008000 - -$$$$$$$$$$$$$$$$$$$$$$$$++!++++8+ \ No newline at end of file diff --git a/tests/fuzz-crashes/57.fuzz b/tests/fuzz-crashes/57.fuzz deleted file mode 100644 index 72535f9..0000000 --- a/tests/fuzz-crashes/57.fuzz +++ /dev/null @@ -1,2 +0,0 @@ -#+++*++$$$$$$$$$$$$$$$$++!++$$$$$$$$$$$ -:#!0000000000:0000'0:::::++8+ \ No newline at end of file diff --git a/tests/fuzz-crashes/58.fuzz b/tests/fuzz-crashes/58.fuzz deleted file mode 100644 index 0cb1005..0000000 Binary files a/tests/fuzz-crashes/58.fuzz and /dev/null differ diff --git a/tests/fuzz-crashes/59.fuzz b/tests/fuzz-crashes/59.fuzz deleted file mode 100644 index 9da9975..0000000 Binary files a/tests/fuzz-crashes/59.fuzz and /dev/null differ diff --git a/tests/fuzz-crashes/6.fuzz b/tests/fuzz-crashes/6.fuzz deleted file mode 100644 index e6d0382..0000000 --- a/tests/fuzz-crashes/6.fuzz +++ /dev/null @@ -1,5 +0,0 @@ -#!00000000000000000 - -:symbol00K00000 - -' diff --git a/tests/fuzz-crashes/60.fuzz b/tests/fuzz-crashes/60.fuzz deleted file mode 100644 index 3362a4a..0000000 --- a/tests/fuzz-crashes/60.fuzz +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - -# - - - - - -:ex - - - - - - - - - - - -:exportport plportport plus minu plus mirtport plus minu plus mi - - - - diff --git a/tests/fuzz-crashes/61.fuzz b/tests/fuzz-crashes/61.fuzz deleted file mode 100644 index a11470e..0000000 Binary files a/tests/fuzz-crashes/61.fuzz and /dev/null differ diff --git a/tests/fuzz-crashes/62.fuzz b/tests/fuzz-crashes/62.fuzz deleted file mode 100644 index a1bae13..0000000 --- a/tests/fuzz-crashes/62.fuzz +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - -:export plus minus f00 æs f0 - - - - - - - - - - - - - - - -:e minus f00 plus minsxport - - -:export pluus - - - - - diff --git a/tests/fuzz-crashes/63.fuzz b/tests/fuzz-crashes/63.fuzz deleted file mode 100644 index 17e8ae3..0000000 --- a/tests/fuzz-crashes/63.fuzz +++ /dev/null @@ -1,5 +0,0 @@ -#!00000000000000 - -∇ r0 -⎕←00:, 0 -∇ diff --git a/tests/fuzz-crashes/64.fuzz b/tests/fuzz-crashes/64.fuzz deleted file mode 100644 index 14d5120..0000000 Binary files a/tests/fuzz-crashes/64.fuzz and /dev/null differ diff --git a/tests/fuzz-crashes/65.fuzz b/tests/fuzz-crashes/65.fuzz deleted file mode 100644 index d0219bd..0000000 --- a/tests/fuzz-crashes/65.fuzz +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - -:e - - - -$$$$$sZZZZZZZZZZZZZZXZZZZZZjZZZZ minus f00"æs f0 - - - - - - -s - - - - - -$$8$$ diff --git a/tests/fuzz-crashes/66.fuzz b/tests/fuzz-crashes/66.fuzz deleted file mode 100644 index ddbd662..0000000 Binary files a/tests/fuzz-crashes/66.fuzz and /dev/null differ diff --git a/tests/fuzz-crashes/67.fuzz b/tests/fuzz-crashes/67.fuzz deleted file mode 100644 index ca54d42..0000000 Binary files a/tests/fuzz-crashes/67.fuzz and /dev/null differ diff --git a/tests/fuzz-crashes/68.fuzz b/tests/fuzz-crashes/68.fuzz deleted file mode 100644 index 9f9bcea..0000000 --- a/tests/fuzz-crashes/68.fuzz +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - -:export plus minus f00 - - - - - -:export plus minus æs f - - - - -:export pl++++us minus:f00 - - - - - - - - - - - - - - diff --git a/tests/fuzz-crashes/69.fuzz b/tests/fuzz-crashes/69.fuzz deleted file mode 100644 index e295d5e..0000000 --- a/tests/fuzz-crashes/69.fuzz +++ /dev/null @@ -1,7 +0,0 @@ - - - -:export plus mi\us f00 æs f$+$$$$$$$$$$ -$$$$$$$$$$$$$$$$$$$$${{n{{p0000@l$$$$$$$$$$$$$$$$$#$$$$$$$$$$$$$$$$++!++$$$$$%$$$@#$$$$$$$$$$$$$$$$$$$$$$$$$${{{[{p0000@l$inus f00 æ$$$$$$$00000 - -':$$$$$$$$$$$$$$$$$$$$$$$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$#$$$$$$$$$++←00$$$$$++8+ \ No newline at end of file diff --git a/tests/fuzz-crashes/7.fuzz b/tests/fuzz-crashes/7.fuzz deleted file mode 100644 index 1cae677..0000000 --- a/tests/fuzz-crashes/7.fuzz +++ /dev/null @@ -1,7 +0,0 @@ -00000000 - -:s00 - -'00'#!00000000000000 - -' diff --git a/tests/fuzz-crashes/70.fuzz b/tests/fuzz-crashes/70.fuzz deleted file mode 100644 index 183ca85..0000000 --- a/tests/fuzz-crashes/70.fuzz +++ /dev/null @@ -1,4 +0,0 @@ - - - -:export plus minus f00 æs f$+$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$${{n{{p0000@lus mi$$:#$$$$$#$$+$$$$$$$$$$$$$$$$++!++$$$$$%$$$@#$$$$$$$$$$$$$$$$$$$$$$$$$$${{{{p0000@l$inus f00 æ$$$$$$$$$$$$@$$$$$$$$$$$$$$$$$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$${$$$$$$$$$$$$$$$$$$#$$$$$$$$$++←00$$$$$++8+ \ No newline at end of file diff --git a/tests/fuzz-crashes/71.fuzz b/tests/fuzz-crashes/71.fuzz deleted file mode 100644 index 14f2ae6..0000000 --- a/tests/fuzz-crashes/71.fuzz +++ /dev/null @@ -1 +0,0 @@ -:p,u𱱱s/m$$$$$$$$$$$$$$$$$$$$$4$$ \ No newline at end of file diff --git a/tests/fuzz-crashes/72.fuzz b/tests/fuzz-crashes/72.fuzz deleted file mode 100644 index 1a826eb..0000000 Binary files a/tests/fuzz-crashes/72.fuzz and /dev/null differ diff --git a/tests/fuzz-crashes/73.fuzz b/tests/fuzz-crashes/73.fuzz deleted file mode 100644 index a2deac1..0000000 --- a/tests/fuzz-crashes/73.fuzz +++ /dev/null @@ -1,7 +0,0 @@ - - - -:export plus mi\us f00 æs f$+$$$$$$$$$$ -$$$$$$$$$$$$$$$$$$$$vvvvvvvvvvvvvvv mi$$$#$$$$$#$$+$$$$$$$$$%$$$$$$++!++$$$$$%$$$@#$$$$$$$$$$$$$$$$$$$$$$$$$${{{{{Q0000@l$inus f00 æ$$$$$$$00000 - -':$$$$$$$$$$$$$$$$$$$$$$$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$EEE$$$$$#$$$$$$$$$++←00$$$$$++8+ \ No newline at end of file diff --git a/tests/fuzz-crashes/74.fuzz b/tests/fuzz-crashes/74.fuzz deleted file mode 100644 index 9f4aa7f..0000000 Binary files a/tests/fuzz-crashes/74.fuzz and /dev/null differ diff --git a/tests/fuzz-crashes/75.fuzz b/tests/fuzz-crashes/75.fuzz deleted file mode 100644 index 151a3e8..0000000 --- a/tests/fuzz-crashes/75.fuzz +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - -:export p,us minus f00"æsssssssssssssssssss%f0 - - - - - - - -:eyport $$$ diff --git a/tests/fuzz-crashes/76.fuzz b/tests/fuzz-crashes/76.fuzz deleted file mode 100644 index 3c62449..0000000 --- a/tests/fuzz-crashes/76.fuzz +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - -:export p,us $$$$$$$$$$$$$$$$$$$$$$:$$ \ No newline at end of file diff --git a/tests/fuzz-crashes/77.fuzz b/tests/fuzz-crashes/77.fuzz deleted file mode 100644 index 171f0c2..0000000 --- a/tests/fuzz-crashes/77.fuzz +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - -æs f0 - - - - - - - - - - - - - -$$$$$ -ZZZZZZZZZZZZZZZZZZZZ mjnus f00" - - - - - - - -:e - - - -$$$$$sZZZZZZ \ No newline at end of file diff --git a/tests/fuzz-crashes/78.fuzz b/tests/fuzz-crashes/78.fuzz deleted file mode 100644 index 334fe5f..0000000 --- a/tests/fuzz-crashes/78.fuzz +++ /dev/null @@ -1,3 +0,0 @@ -:!00000000000000 - -' diff --git a/tests/fuzz-crashes/79.fuzz b/tests/fuzz-crashes/79.fuzz deleted file mode 100644 index aafbf74..0000000 --- a/tests/fuzz-crashes/79.fuzz +++ /dev/null @@ -1,3 +0,0 @@ -#:00000000000000 - -' diff --git a/tests/fuzz-crashes/8.fuzz b/tests/fuzz-crashes/8.fuzz deleted file mode 100644 index 7dc1be2..0000000 Binary files a/tests/fuzz-crashes/8.fuzz and /dev/null differ diff --git a/tests/fuzz-crashes/80.fuzz b/tests/fuzz-crashes/80.fuzz deleted file mode 100644 index 783b377..0000000 --- a/tests/fuzz-crashes/80.fuzz +++ /dev/null @@ -1,3 +0,0 @@ -#!00000000000000 - -: diff --git a/tests/fuzz-crashes/81.fuzz b/tests/fuzz-crashes/81.fuzz deleted file mode 100644 index 643fc36..0000000 --- a/tests/fuzz-crashes/81.fuzz +++ /dev/null @@ -1,5 +0,0 @@ -#!00000000000000 -00000000000000 - -:symbol0 -' diff --git a/tests/fuzz-crashes/82.fuzz b/tests/fuzz-crashes/82.fuzz deleted file mode 100644 index c692935..0000000 --- a/tests/fuzz-crashes/82.fuzz +++ /dev/null @@ -1,7 +0,0 @@ -#!0000 - -00'000000 -000000:00000∇ 0 - -00 -' diff --git a/tests/fuzz-crashes/83.fuzz b/tests/fuzz-crashes/83.fuzz deleted file mode 100644 index 99513b4..0000000 --- a/tests/fuzz-crashes/83.fuzz +++ /dev/null @@ -1,5 +0,0 @@ -00000000 - -:m#!00000004000000 - -'* \ No newline at end of file diff --git a/tests/fuzz-crashes/84.fuzz b/tests/fuzz-crashes/84.fuzz deleted file mode 100644 index 173aec9..0000000 --- a/tests/fuzz-crashes/84.fuzz +++ /dev/null @@ -1,4 +0,0 @@ -#!!00!0000000000000 -:symcoS0001000000000 - -' diff --git a/tests/fuzz-crashes/85.fuzz b/tests/fuzz-crashes/85.fuzz deleted file mode 100644 index 88f4dc2..0000000 --- a/tests/fuzz-crashes/85.fuzz +++ /dev/null @@ -1 +0,0 @@ -#!:#!:000000 \ No newline at end of file diff --git a/tests/fuzz-crashes/86.fuzz b/tests/fuzz-crashes/86.fuzz deleted file mode 100644 index d4e8fe8..0000000 --- a/tests/fuzz-crashes/86.fuzz +++ /dev/null @@ -1,3 +0,0 @@ -::::::::::::#!!/000$00000000 - -' diff --git a/tests/fuzz-crashes/87.fuzz b/tests/fuzz-crashes/87.fuzz deleted file mode 100644 index 4a72071..0000000 --- a/tests/fuzz-crashes/87.fuzz +++ /dev/null @@ -1,6 +0,0 @@ -#!000PPPPPPPPPP00000000 - -∇ r0 -⎕00000000:00 - -' diff --git a/tests/fuzz-crashes/88.fuzz b/tests/fuzz-crashes/88.fuzz deleted file mode 100644 index 04be9a1..0000000 --- a/tests/fuzz-crashes/88.fuzz +++ /dev/null @@ -1,5 +0,0 @@ -#!000000000 - -:symb''ol plu000000 - -' diff --git a/tests/fuzz-crashes/89.fuzz b/tests/fuzz-crashes/89.fuzz deleted file mode 100644 index acfc310..0000000 --- a/tests/fuzz-crashes/89.fuzz +++ /dev/null @@ -1,7 +0,0 @@ -#!000000 - -:æ000 - -000 - -+ diff --git a/tests/fuzz-crashes/9.fuzz b/tests/fuzz-crashes/9.fuzz deleted file mode 100644 index 466e317..0000000 --- a/tests/fuzz-crashes/9.fuzz +++ /dev/null @@ -1,5 +0,0 @@ -#!000000000000000 - -:symbol000080000000 - -' diff --git a/tests/fuzz-crashes/90.fuzz b/tests/fuzz-crashes/90.fuzz deleted file mode 100644 index 9da10fc..0000000 --- a/tests/fuzz-crashes/90.fuzz +++ /dev/null @@ -1 +0,0 @@ -#::::)00000::::::::: \ No newline at end of file diff --git a/tests/fuzz-crashes/91.fuzz b/tests/fuzz-crashes/91.fuzz deleted file mode 100644 index 397db75..0000000 --- a/tests/fuzz-crashes/91.fuzz +++ /dev/null @@ -1 +0,0 @@ -: diff --git a/tests/fuzz-crashes/92.fuzz b/tests/fuzz-crashes/92.fuzz deleted file mode 100644 index f9d41a2..0000000 --- a/tests/fuzz-crashes/92.fuzz +++ /dev/null @@ -1,5 +0,0 @@ -00 - -:symbo00000.ym0 æ000 - -' \ No newline at end of file diff --git a/tests/fuzz-crashes/93.fuzz b/tests/fuzz-crashes/93.fuzz deleted file mode 100644 index cf884cf..0000000 --- a/tests/fuzz-crashes/93.fuzz +++ /dev/null @@ -1,3 +0,0 @@ -#!+#s 00 - -:symbol p+ \ No newline at end of file diff --git a/tests/fuzz-crashes/94.fuzz b/tests/fuzz-crashes/94.fuzz deleted file mode 100644 index c5c0703..0000000 --- a/tests/fuzz-crashes/94.fuzz +++ /dev/null @@ -1,3 +0,0 @@ -#9############!lus 000 - -:ex++++###################!++++++++++++(+++++ \ No newline at end of file diff --git a/tests/fuzz-crashes/95.fuzz b/tests/fuzz-crashes/95.fuzz deleted file mode 100644 index 113b74a..0000000 --- a/tests/fuzz-crashes/95.fuzz +++ /dev/null @@ -1 +0,0 @@ -##############!++++###################!+:++++++++++(+++++ \ No newline at end of file diff --git a/tests/fuzz-crashes/96.fuzz b/tests/fuzz-crashes/96.fuzz deleted file mode 100644 index 7c63ada..0000000 --- a/tests/fuzz-crashes/96.fuzz +++ /dev/null @@ -1 +0,0 @@ -#######################C###!++++#################C#!++++++:m++++(+++++ \ No newline at end of file diff --git a/tests/fuzz-crashes/97.fuzz b/tests/fuzz-crashes/97.fuzz deleted file mode 100644 index f2dbfa9..0000000 Binary files a/tests/fuzz-crashes/97.fuzz and /dev/null differ diff --git a/tests/fuzz-crashes/98.fuzz b/tests/fuzz-crashes/98.fuzz deleted file mode 100644 index 336bf39..0000000 --- a/tests/fuzz-crashes/98.fuzz +++ /dev/null @@ -1,2 +0,0 @@ -##############ttttttttttttttnnnnn0& -:sy*##!++/++++++++++++#ttt++++2++++tttt++ \ No newline at end of file diff --git a/tests/fuzz-crashes/99.fuzz b/tests/fuzz-crashes/99.fuzz deleted file mode 100644 index 45978c2..0000000 --- a/tests/fuzz-crashes/99.fuzz +++ /dev/null @@ -1,3 +0,0 @@ - f00000000000ex0 - -:e \ No newline at end of file diff --git a/tests/fuzz-crashes/Makefile.am b/tests/fuzz-crashes/Makefile.am index 8ac2283..e69de29 100644 --- a/tests/fuzz-crashes/Makefile.am +++ b/tests/fuzz-crashes/Makefile.am @@ -1 +0,0 @@ -TEST_INPUTS += tests/fuzz-crashes/1.fuzz tests/fuzz-crashes/10.fuzz tests/fuzz-crashes/100.fuzz tests/fuzz-crashes/101.fuzz tests/fuzz-crashes/102.fuzz tests/fuzz-crashes/103.fuzz tests/fuzz-crashes/104.fuzz tests/fuzz-crashes/105.fuzz tests/fuzz-crashes/106.fuzz tests/fuzz-crashes/107.fuzz tests/fuzz-crashes/108.fuzz tests/fuzz-crashes/109.fuzz tests/fuzz-crashes/11.fuzz tests/fuzz-crashes/110.fuzz tests/fuzz-crashes/111.fuzz tests/fuzz-crashes/12.fuzz tests/fuzz-crashes/13.fuzz tests/fuzz-crashes/14.fuzz tests/fuzz-crashes/15.fuzz tests/fuzz-crashes/16.fuzz tests/fuzz-crashes/17.fuzz tests/fuzz-crashes/18.fuzz tests/fuzz-crashes/19.fuzz tests/fuzz-crashes/2.fuzz tests/fuzz-crashes/20.fuzz tests/fuzz-crashes/21.fuzz tests/fuzz-crashes/22.fuzz tests/fuzz-crashes/23.fuzz tests/fuzz-crashes/24.fuzz tests/fuzz-crashes/25.fuzz tests/fuzz-crashes/26.fuzz tests/fuzz-crashes/27.fuzz tests/fuzz-crashes/28.fuzz tests/fuzz-crashes/29.fuzz tests/fuzz-crashes/3.fuzz tests/fuzz-crashes/30.fuzz tests/fuzz-crashes/31.fuzz tests/fuzz-crashes/32.fuzz tests/fuzz-crashes/33.fuzz tests/fuzz-crashes/34.fuzz tests/fuzz-crashes/35.fuzz tests/fuzz-crashes/36.fuzz tests/fuzz-crashes/37.fuzz tests/fuzz-crashes/38.fuzz tests/fuzz-crashes/39.fuzz tests/fuzz-crashes/4.fuzz tests/fuzz-crashes/40.fuzz tests/fuzz-crashes/41.fuzz tests/fuzz-crashes/42.fuzz tests/fuzz-crashes/43.fuzz tests/fuzz-crashes/44.fuzz tests/fuzz-crashes/45.fuzz tests/fuzz-crashes/46.fuzz tests/fuzz-crashes/47.fuzz tests/fuzz-crashes/48.fuzz tests/fuzz-crashes/49.fuzz tests/fuzz-crashes/5.fuzz tests/fuzz-crashes/50.fuzz tests/fuzz-crashes/51.fuzz tests/fuzz-crashes/52.fuzz tests/fuzz-crashes/53.fuzz tests/fuzz-crashes/54.fuzz tests/fuzz-crashes/55.fuzz tests/fuzz-crashes/56.fuzz tests/fuzz-crashes/57.fuzz tests/fuzz-crashes/58.fuzz tests/fuzz-crashes/59.fuzz tests/fuzz-crashes/6.fuzz tests/fuzz-crashes/60.fuzz tests/fuzz-crashes/61.fuzz tests/fuzz-crashes/62.fuzz tests/fuzz-crashes/63.fuzz tests/fuzz-crashes/64.fuzz tests/fuzz-crashes/65.fuzz tests/fuzz-crashes/66.fuzz tests/fuzz-crashes/67.fuzz tests/fuzz-crashes/68.fuzz tests/fuzz-crashes/69.fuzz tests/fuzz-crashes/7.fuzz tests/fuzz-crashes/70.fuzz tests/fuzz-crashes/71.fuzz tests/fuzz-crashes/72.fuzz tests/fuzz-crashes/73.fuzz tests/fuzz-crashes/74.fuzz tests/fuzz-crashes/75.fuzz tests/fuzz-crashes/76.fuzz tests/fuzz-crashes/77.fuzz tests/fuzz-crashes/78.fuzz tests/fuzz-crashes/79.fuzz tests/fuzz-crashes/8.fuzz tests/fuzz-crashes/80.fuzz tests/fuzz-crashes/81.fuzz tests/fuzz-crashes/82.fuzz tests/fuzz-crashes/83.fuzz tests/fuzz-crashes/84.fuzz tests/fuzz-crashes/85.fuzz tests/fuzz-crashes/86.fuzz tests/fuzz-crashes/87.fuzz tests/fuzz-crashes/88.fuzz tests/fuzz-crashes/89.fuzz tests/fuzz-crashes/9.fuzz tests/fuzz-crashes/90.fuzz tests/fuzz-crashes/91.fuzz tests/fuzz-crashes/92.fuzz tests/fuzz-crashes/93.fuzz tests/fuzz-crashes/94.fuzz tests/fuzz-crashes/95.fuzz tests/fuzz-crashes/96.fuzz tests/fuzz-crashes/97.fuzz tests/fuzz-crashes/98.fuzz tests/fuzz-crashes/99.fuzz diff --git a/tools/fuzz b/tools/fuzz index ba3c5f6..2e348b0 100755 --- a/tools/fuzz +++ b/tools/fuzz @@ -11,13 +11,13 @@ fi rm -rf builds/fuzz-$1 mkdir -p builds/fuzz-$1 cd builds/fuzz-$1 -../../configure --enable-enable-build-mode=$1 --disable-shared CC=afl-cc +../../configure --enable-build-mode=$1 --disable-shared CC=afl-cc make clean && make mkdir -p fuzz-in mkdir -p fuzz-out mkdir -p fuzz-in-min n=0 -for f in ../../tests/scripts/good/*.aplwc ../../tests/scripts/bad/*.aplwc +for f in ../../tests/scripts/good/*.aplwc ../../tests/scripts/bad/*.aplwc ../../tests/fuzz-crashes/*.fuzz do cp "$f" fuzz-in/$n n=$((n+1)) -- cgit v1.2.3