Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Mar 2024 21:19:51 GMT
From:      Gleb Popov <arrowd@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 9e3ff8f0b99e - main - devel/qt5-script: Prevent clang from optimizing the code with undefined behavior
Message-ID:  <202403222119.42MLJpHa086376@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by arrowd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9e3ff8f0b99e7b3074f3e83c954a0395185f63f0

commit 9e3ff8f0b99e7b3074f3e83c954a0395185f63f0
Author:     Tomas Tevesz <ice@extreme.hu>
AuthorDate: 2024-03-22 21:16:49 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2024-03-22 21:18:36 +0000

    devel/qt5-script: Prevent clang from optimizing the code with undefined behavior
    
    PR:             277236
    Obtained from:  OpenBSD ports
---
 devel/qt5-script/Makefile                                 |  2 +-
 ..._javascriptcore_JavaScriptCore_interpreter_CallFrame.h | 15 +++++++++++++++
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/devel/qt5-script/Makefile b/devel/qt5-script/Makefile
index cd8e2cddefbc..5fbf625428c9 100644
--- a/devel/qt5-script/Makefile
+++ b/devel/qt5-script/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	script
 PORTVERSION=	${QT5_VERSION}${QT5_KDE_PATCH}
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	devel
 PKGNAMEPREFIX=	qt5-
 
diff --git a/devel/qt5-script/files/patch-src_3rdparty_javascriptcore_JavaScriptCore_interpreter_CallFrame.h b/devel/qt5-script/files/patch-src_3rdparty_javascriptcore_JavaScriptCore_interpreter_CallFrame.h
new file mode 100644
index 000000000000..bce9105b6145
--- /dev/null
+++ b/devel/qt5-script/files/patch-src_3rdparty_javascriptcore_JavaScriptCore_interpreter_CallFrame.h
@@ -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); }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202403222119.42MLJpHa086376>