Skip to content

Commit 5cc429e

Browse files
committed
Disable __builtin_assume_aligned for now since it seems to lead to segfaults
1 parent 1a8d6ea commit 5cc429e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

include/kernel_float/macros.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
#define KERNEL_FLOAT_CALL(F, ...) F(__VA_ARGS__)
5151

5252
// TOOD: check if this way is support across all compilers
53-
#if defined(__has_builtin)
53+
#if defined(__has_builtin) && 0 // Seems that `__builtin_assume_aligned` leads to segfaults
5454
#if __has_builtin(__builtin_assume_aligned)
5555
#define KERNEL_FLOAT_ASSUME_ALIGNED(TYPE, PTR, ALIGNMENT) \
5656
static_cast<TYPE*>(__builtin_assume_aligned(static_cast<TYPE*>(PTR), (ALIGNMENT)))

single_include/kernel_float.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
//================================================================================
1818
// this file has been auto-generated, do not modify its contents!
19-
// date: 2024-04-26 09:45:38.335903
20-
// git hash: 91f4860ae4ece05ec4d8e198d62d9486efa761db
19+
// date: 2024-04-26 10:04:14.741793
20+
// git hash: 1a8d6ea7dbbe205260c8731e19ed3a0daa2411a6
2121
//================================================================================
2222

2323
#ifndef KERNEL_FLOAT_MACROS_H
@@ -72,7 +72,7 @@
7272
#define KERNEL_FLOAT_CALL(F, ...) F(__VA_ARGS__)
7373

7474
// TOOD: check if this way is support across all compilers
75-
#if defined(__has_builtin)
75+
#if defined(__has_builtin) && 0 // Seems that `__builtin_assume_aligned` leads to segfaults
7676
#if __has_builtin(__builtin_assume_aligned)
7777
#define KERNEL_FLOAT_ASSUME_ALIGNED(TYPE, PTR, ALIGNMENT) \
7878
static_cast<TYPE*>(__builtin_assume_aligned(static_cast<TYPE*>(PTR), (ALIGNMENT)))

0 commit comments

Comments
 (0)