Fix some UBSAN false positives (#6115)

* Fix some UBSAN false positives.
* ruby tool/update-deps --fix
This commit is contained in:
Kevin Backhouse 2022-07-12 19:48:10 +01:00 committed by GitHub
parent 8309b1366c
commit 8c1808151f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
Notes: git 2022-07-13 03:48:32 +09:00
Merged-By: jhawthorn <john@hawthorn.email>
4 changed files with 11 additions and 4 deletions

View file

@ -37,6 +37,7 @@
#include "regparse.h"
#include <stdarg.h>
#include "internal/sanitizers.h"
#define WARN_BUFSIZE 256
@ -394,6 +395,8 @@ str_end_cmp(st_data_t xp, st_data_t yp)
return 0;
}
NO_SANITIZE("unsigned-integer-overflow", static st_index_t str_end_hash(st_data_t xp));
static st_index_t
str_end_hash(st_data_t xp)
{