summaryrefslogtreecommitdiff
path: root/external/python3
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-01-17 21:07:01 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-01-17 21:07:01 +0100
commitd0f3363aa8db533ba6fe356053caaf79a1507d14 (patch)
tree7a39619e2375bec57a7b5c6e577d5a6d4dca8ccd /external/python3
parent562edf0f09ba4e82fb9186aa75ee88fd7f68d18f (diff)
Fix patch
The original patch caused compilation of x86-ffi64.c to fail, but that failure was silently ignored by the build. Change-Id: I93a0cde041b8f9546873d6cc30c1b690da098642
Diffstat (limited to 'external/python3')
-rw-r--r--external/python3/ubsan.patch.012
1 files changed, 6 insertions, 6 deletions
diff --git a/external/python3/ubsan.patch.0 b/external/python3/ubsan.patch.0
index ab2acd3a0205..936a8ace9949 100644
--- a/external/python3/ubsan.patch.0
+++ b/external/python3/ubsan.patch.0
@@ -43,15 +43,15 @@
tramp[0] = 0xbb49; /* mov <code>, %r11 */
- *(void* volatile*)&tramp[1] = ffi_closure_unix64;
+ tramp[1] = (unsigned short) ffi_closure_unix64;
-+ tramp[2] = (unsigned short) (ffi_closure_unix64 >> 16);
-+ tramp[3] = (unsigned short) (ffi_closure_unix64 >> 32);
-+ tramp[4] = (unsigned short) (ffi_closure_unix64 >> 48);
++ tramp[2] = (unsigned short) (((unsigned long)ffi_closure_unix64) >> 16);
++ tramp[3] = (unsigned short) (((unsigned long)ffi_closure_unix64) >> 32);
++ tramp[4] = (unsigned short) (((unsigned long)ffi_closure_unix64) >> 48);
tramp[5] = 0xba49; /* mov <data>, %r10 */
- *(void* volatile*)&tramp[6] = closure;
+ tramp[6] = (unsigned short) closure;
-+ tramp[7] = (unsigned short) (closure >> 16);
-+ tramp[8] = (unsigned short) (closure >> 32);
-+ tramp[9] = (unsigned short) (closure >> 48);
++ tramp[7] = (unsigned short) (((unsigned long)closure) >> 16);
++ tramp[8] = (unsigned short) (((unsigned long)closure) >> 32);
++ tramp[9] = (unsigned short) (((unsigned long)closure) >> 48);
/* Set the carry bit if the function uses any sse registers.
This is clc or stc, together with the first byte of the jmp. */