You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using libunwind and when compiling my program with -fsanitize=undefined I get several reports of undefined behavior:
native/native-code-nativelib_native0.4_3-0.4.17-2/scala-native/platform/posix/libunwind/UnwindCursor.hpp:286:17: runtime error: applying non-zero offset 156 to null pointer
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior native/native-code-nativelib_native0.4_3-0.4.17-2/scala-native/platform/posix/libunwind/UnwindCursor.hpp:286:17 in
native/native-code-nativelib_native0.4_3-0.4.17-2/scala-native/platform/posix/libunwind/UnwindCursor.hpp:286:17: runtime error: member access within null pointer of type 'unwind_info_section_header_index_entry'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior native/native-code-nativelib_native0.4_3-0.4.17-2/scala-native/platform/posix/libunwind/UnwindCursor.hpp:286:17 in
native/native-code-nativelib_native0.4_3-0.4.17-2/scala-native/platform/posix/libunwind/UnwindCursor.hpp:291:17: runtime error: member access within null pointer of type 'unwind_info_section_header_index_entry'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior native/native-code-nativelib_native0.4_3-0.4.17-2/scala-native/platform/posix/libunwind/UnwindCursor.hpp:291:17 in
native/native-code-nativelib_native0.4_3-0.4.17-2/scala-native/platform/posix/libunwind/UnwindCursor.hpp:296:17: runtime error: member access within null pointer of type 'unwind_info_section_header_index_entry'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior native/native-code-nativelib_native0.4_3-0.4.17-2/scala-native/platform/posix/libunwind/UnwindCursor.hpp:296:17 in
native/native-code-nativelib_native0.4_3-0.4.17-2/scala-native/platform/posix/libunwind/UnwindCursor.hpp:296:17: runtime error: applying non-zero offset 12 to null pointer
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior native/native-code-nativelib_native0.4_3-0.4.17-2/scala-native/platform/posix/libunwind/UnwindCursor.hpp:296:17 in
native/native-code-nativelib_native0.4_3-0.4.17-2/scala-native/platform/posix/libunwind/UnwindCursor.hpp:337:17: runtime error: applying non-zero offset 2040 to null pointer
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior native/native-code-nativelib_native0.4_3-0.4.17-2/scala-native/platform/posix/libunwind/UnwindCursor.hpp:337:17 in
native/native-code-nativelib_native0.4_3-0.4.17-2/scala-native/platform/posix/libunwind/UnwindCursor.hpp:343:9: runtime error: applying non-zero offset 160 to null pointer
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior native/native-code-nativelib_native0.4_3-0.4.17-2/scala-native/platform/posix/libunwind/UnwindCursor.hpp:343:9 in
native/native-code-nativelib_native0.4_3-0.4.17-2/scala-native/platform/posix/libunwind/UnwindCursor.hpp:291:17: runtime error: applying non-zero offset 228 to null pointer
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior native/native-code-nativelib_native0.4_3-0.4.17-2/scala-native/platform/posix/libunwind/UnwindCursor.hpp:291:17 in
Each of these is using the arrayoffsetof macro, which is defined like this:
In debug mode, zig cc enables `-fsanitize-debug` which causes the program to
get killed with SIGILL or SIGTRAP because of undefined behavior.
See ziglang/zig#4830 and llvm/llvm-project#91144
In debug mode, zig cc enables `-fsanitize-debug` which causes the program to
get killed with SIGILL or SIGTRAP because of undefined behavior.
See ziglang/zig#4830 and llvm/llvm-project#91144
@DanielKristofKiss thank you for looking into that issue! Unfortunately, I won't be able to try your patch for some time. I'll report back when possible and nobody beats me to it.
I am using libunwind and when compiling my program with
-fsanitize=undefined
I get several reports of undefined behavior:Each of these is using the
arrayoffsetof
macro, which is defined like this:The text was updated successfully, but these errors were encountered: