Make redbean StoreAsset() work better

- Better UBSAN error messages
- POSIX Advisory Locks polyfills
- Move redbean manual to /.help.txt
- System call memory safety in ASAN mode
- Character classification now does UNICODE
This commit is contained in:
Justine Tunney 2021-05-14 05:36:58 -07:00
parent 919b6fec10
commit 690be544da
228 changed files with 3653 additions and 3015 deletions

View file

@ -154,4 +154,17 @@ BENCH(regex, bench) {
EZBENCH2("precompiled nosub match", donothing, D(&rx, m));
free(m);
regfree(&rx);
EXPECT_EQ(REG_OK, regcomp(&rx, "^[a-z]*$", REG_EXTENDED | REG_NOSUB));
m = calloc(rx.re_nsub + 1, sizeof(regmatch_t));
EZBENCH2("precompiled alpha", donothing,
regexec(&rx, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", 0, 0, 0));
free(m);
regfree(&rx);
EXPECT_EQ(REG_OK,
regcomp(&rx, "^[a-z]*$", REG_EXTENDED | REG_NOSUB | REG_ICASE));
m = calloc(rx.re_nsub + 1, sizeof(regmatch_t));
EZBENCH2("precompiled alpha icase", donothing,
regexec(&rx, "aaaaaaaaaaaaaaaAAAAAAAAAAAAAA", 0, 0, 0));
free(m);
regfree(&rx);
}