Changeset 2f7d77c6 in mainline
- Timestamp:
- 2018-06-14T19:02:26Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 587478b
- Parents:
- abf8bd8
- git-author:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-06-14 17:48:39)
- git-committer:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-06-14 19:02:26)
- Files:
-
- 2 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
HelenOS.config
rabf8bd8 r2f7d77c6 379 379 ! CONFIG_DEBUG (y/n) 380 380 381 % Sanitize undefined behavior (userspace) 382 ! CONFIG_UBSAN (n/y) 383 384 % Sanitize undefined behavior (kernel) 385 ! CONFIG_UBSAN_KERNEL (n/y) 386 381 387 % Deadlock detection support for spinlocks 382 388 ! [CONFIG_DEBUG=y&CONFIG_SMP=y] CONFIG_DEBUG_SPINLOCK (y/n) -
kernel/Makefile
rabf8bd8 r2f7d77c6 106 106 ifeq ($(CONFIG_DEBUG),y) 107 107 COMMON_CFLAGS += -Werror 108 endif 109 110 ifeq ($(CONFIG_UBSAN_KERNEL),y) 111 COMMON_CFLAGS += -fsanitize=undefined 108 112 endif 109 113 … … 209 213 generic/src/lib/ra.c \ 210 214 generic/src/lib/rd.c \ 215 generic/src/lib/ubsan.c \ 211 216 generic/src/printf/printf_core.c \ 212 217 generic/src/printf/printf.c \ -
kernel/generic/include/lib/memfnc.h
rabf8bd8 r2f7d77c6 51 51 __attribute__((nonnull(1, 2))) 52 52 ATTRIBUTE_OPTIMIZE("-fno-tree-loop-distribute-patterns") DO_NOT_DISCARD; 53 extern int memcmp(const void *, const void *, size_t len) 54 __attribute__((nonnull(1, 2))) 55 ATTRIBUTE_OPTIMIZE("-fno-tree-loop-distribute-patterns") DO_NOT_DISCARD; 53 56 54 57 #define alloca(size) __builtin_alloca((size)) -
kernel/generic/include/mem.h
rabf8bd8 r2f7d77c6 48 48 #define memset(dst, val, cnt) __builtin_memset((dst), (val), (cnt)) 49 49 #define memcpy(dst, src, cnt) __builtin_memcpy((dst), (src), (cnt)) 50 #define memcmp(s1, s2, cnt) __builtin_memcmp((s1), (s2), (cnt)) 50 51 51 52 extern void memsetb(void *, size_t, uint8_t) -
kernel/generic/src/lib/memfnc.c
rabf8bd8 r2f7d77c6 87 87 } 88 88 89 /** Compare two memory areas. 90 * 91 * @param s1 Pointer to the first area to compare. 92 * @param s2 Pointer to the second area to compare. 93 * @param len Size of the areas in bytes. 94 * 95 * @return Zero if areas have the same contents. If they differ, 96 * the sign of the result is the same as the sign of the 97 * difference of the first pair of different bytes. 98 * 99 */ 100 int memcmp(const void *s1, const void *s2, size_t len) 101 { 102 uint8_t *u1 = (uint8_t *) s1; 103 uint8_t *u2 = (uint8_t *) s2; 104 size_t i; 105 106 for (i = 0; i < len; i++) { 107 if (*u1 != *u2) 108 return (int)(*u1) - (int)(*u2); 109 ++u1; 110 ++u2; 111 } 112 113 return 0; 114 } 115 89 116 /** @} 90 117 */ -
uspace/Makefile.common
rabf8bd8 r2f7d77c6 190 190 endif 191 191 192 ifeq ($(CONFIG_UBSAN),y) 193 DEFAULT_CFLAGS += -fsanitize=undefined 194 endif 195 192 196 ifeq ($(COMPILER),clang) 193 197 DEFAULT_CFLAGS += \ -
uspace/lib/c/Makefile
rabf8bd8 r2f7d77c6 165 165 generic/pio_trace.c \ 166 166 generic/qsort.c \ 167 generic/ubsan.c \ 167 168 generic/uuid.c \ 168 169 generic/vbd.c \ -
uspace/srv/fs/fat/fat_fat.c
rabf8bd8 r2f7d77c6 967 967 */ 968 968 if (!FAT_IS_FAT12(bs) && 969 ((e0 >> 8) != ( FAT_MASK(bs) >> 8) || e1 != FAT_MASK(bs)))969 ((e0 >> 8) != ((fat_cluster_t) FAT_MASK(bs) >> 8) || e1 != FAT_MASK(bs))) 970 970 return ENOTSUP; 971 971 }
Note:
See TracChangeset
for help on using the changeset viewer.