Closed matthijs closed 2 years ago
It's not a problem for X86 arch, you can refer to the discussion on a similar issue: https://github.com/openwall/john/issues/1225.
Thanks, I've added instrumentation to prevent the warning it generates.
Hi @matthijs, how exactly did you solve this issue?
Hi @aacirino
I am using the clang compiler and applied the diff below. It disables the 'undefined' sanitizer from clang for the fromi template function.
diff --git a/fmtlog/fmtlog-inl.h b/fmtlog/fmtlog-inl.h
index bb13719..f9e116d 100644
--- a/fmtlog/fmtlog-inl.h
+++ b/fmtlog/fmtlog-inl.h
@@ -57,9 +57,6 @@ public:
char operator[](int i) const { return s[i]; }
template<typename T>
+#if defined(__clang__)
+ __attribute__((no_sanitize("undefined")))
+#endif
void fromi(T num) {
if constexpr (Size & 1) {
s[Size - 1] = '0' + (num % 10);
Hi @aacirino
I am using the clang compiler and applied the diff below. It disables the 'undefined' sanitizer from clang for the fromi template function.
Thank you very much.
Hi,
When running the following small program under the memory sanitizers:
I got the following output:
Compile line:
I am not sure if the sanitizers are to strict here or there is actual 'undefined behaviour' here. I also didn't take a look at the code on whats happening here...