mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 12:48:22 +00:00
kernel: add ubsan bindings, fix some UB reported by it
This commit is contained in:
@@ -16,7 +16,7 @@ void *memcpy(void *d, const void *s, size_t c) {
|
||||
return d;
|
||||
}
|
||||
|
||||
void *memset(void *ptr, unsigned long value, size_t num) {
|
||||
void *memset(void *ptr, int value, size_t num) {
|
||||
#ifdef __x86_64__
|
||||
asm volatile ("rep stosb" : : "D"(ptr), "a"(value), "c"(num) : "memory");
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user