7
0
Files
nodejs-electron/vector_math_impl-Wstrict-aliasing.patch
Bruno Pitrus 8dd9ce1537 Accepting request 1032854 from home:dziobian:gulgul-ultron:19
- New upstream release 21.2.1
  * Fixed spurious promise rejection in webContents.loadURL when navigating to a hash.
  * Updated Chromium to 106.0.5249.165.
- Add electron-version-from-env.patch to fix build error
- Add upstreamable patches fixing various erroneous C++ constructs
  * ipcz-safe_math-Wuninitialized.patch
  * passwords_counter-Wsubobject-linkage.patch
  * static_constructors-Wstrict-aliasing.patch
  * vector_math_impl-Wstrict-aliasing.patch
  * webgl_image_conversion-Wstrict-aliasing.patch
  * xr_cube_map-Wstrict-aliasing.patch

OBS-URL: https://build.opensuse.org/request/show/1032854
OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs-electron?expand=0&rev=45
2022-11-02 11:16:40 +00:00

28 lines
1023 B
Diff

--- src/third_party/blink/renderer/platform/audio/cpu/x86/vector_math_impl.h.old 2022-10-20 19:00:30.057387900 +0200
+++ src/third_party/blink/renderer/platform/audio/cpu/x86/vector_math_impl.h 2022-10-29 23:03:21.785150600 +0200
@@ -13,6 +13,7 @@
#include <algorithm>
#include <cmath>
+#include <cstring>
#include "base/check_op.h"
#include "third_party/blink/renderer/platform/audio/audio_array.h"
@@ -208,13 +209,14 @@
// source_max = max(abs(source[k])) for all k
void Vmaxmgv(const float* source_p, float* max_p, uint32_t frames_to_process) {
constexpr uint32_t kMask = 0x7FFFFFFFu;
-
+ float kMask_float;
+ std::memcpy(&kMask_float, &kMask, 4);
const float* const source_end_p = source_p + frames_to_process;
DCHECK(IsAligned(source_p));
DCHECK_EQ(0u, frames_to_process % kPackedFloatsPerRegister);
- MType m_mask = MM_PS(set1)(*reinterpret_cast<const float*>(&kMask));
+ MType m_mask = MM_PS(set1)(kMask_float);
MType m_max = MM_PS(setzero)();
while (source_p < source_end_p) {