mirror of
https://git.freebsd.org/ports.git
synced 2025-05-12 15:21:51 -04:00
devel/qt5-script: Prevent clang from optimizing the code with undefined behavior
PR: 277236 Obtained from: OpenBSD ports
This commit is contained in:
parent
860821402c
commit
9e3ff8f0b9
2 changed files with 16 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
|||
PORTNAME= script
|
||||
PORTVERSION= ${QT5_VERSION}${QT5_KDE_PATCH}
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= devel
|
||||
PKGNAMEPREFIX= qt5-
|
||||
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
Index: src/3rdparty/javascriptcore/JavaScriptCore/interpreter/CallFrame.h
|
||||
--- src/3rdparty/javascriptcore/JavaScriptCore/interpreter/CallFrame.h.orig
|
||||
+++ src/3rdparty/javascriptcore/JavaScriptCore/interpreter/CallFrame.h
|
||||
@@ -135,9 +135,11 @@ namespace JSC {
|
||||
static CallFrame* noCaller() { return reinterpret_cast<CallFrame*>(HostCallFrameFlag); }
|
||||
int returnValueRegister() const { return this[RegisterFile::ReturnValueRegister].i(); }
|
||||
|
||||
+#pragma clang optimize off
|
||||
bool hasHostCallFrameFlag() const { return reinterpret_cast<intptr_t>(this) & HostCallFrameFlag; }
|
||||
CallFrame* addHostCallFrameFlag() const { return reinterpret_cast<CallFrame*>(reinterpret_cast<intptr_t>(this) | HostCallFrameFlag); }
|
||||
CallFrame* removeHostCallFrameFlag() { return reinterpret_cast<CallFrame*>(reinterpret_cast<intptr_t>(this) & ~HostCallFrameFlag); }
|
||||
+#pragma clang optimize on
|
||||
|
||||
private:
|
||||
void setArgumentCount(int count) { static_cast<Register*>(this)[RegisterFile::ArgumentCount] = Register::withInt(count); }
|
Loading…
Add table
Reference in a new issue