diff options
| author | Jack Mitchell <ml@embed.me.uk> | 2023-05-10 10:06:48 +0100 |
|---|---|---|
| committer | Armin Kuster <akuster808@gmail.com> | 2023-05-16 07:09:25 -0400 |
| commit | 4c533a5f902842cd65027c072d2bddd6d7b2b5d3 (patch) | |
| tree | 023c8c86651afe2f5c702c5464f524229424e5f7 | |
| parent | c69846bfc6d09b3cca49d4303014fba1d383cfbb (diff) | |
| download | meta-openembedded-4c533a5f902842cd65027c072d2bddd6d7b2b5d3.tar.gz | |
nss: backport fix for native build failure due to dangling pointer with gcc13
Upstream-Status: Backport
Link: https://github.com/nss-dev/nss/commit/cbf5a2bce75ca2c2fd3e247796b9892f5298584e
Signed-off-by: Jack Mitchell <ml@embed.me.uk>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
| -rw-r--r-- | meta-oe/recipes-support/nss/nss/0001-Bug-1826650-cmd-ecperf-fix-dangling-pointer-warning-.patch | 75 | ||||
| -rw-r--r-- | meta-oe/recipes-support/nss/nss_3.51.1.bb | 1 |
2 files changed, 76 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/nss/nss/0001-Bug-1826650-cmd-ecperf-fix-dangling-pointer-warning-.patch b/meta-oe/recipes-support/nss/nss/0001-Bug-1826650-cmd-ecperf-fix-dangling-pointer-warning-.patch new file mode 100644 index 0000000000..dc7e172aae --- /dev/null +++ b/meta-oe/recipes-support/nss/nss/0001-Bug-1826650-cmd-ecperf-fix-dangling-pointer-warning-.patch | |||
| @@ -0,0 +1,75 @@ | |||
| 1 | From cbf5a2bce75ca2c2fd3e247796b9892f5298584e Mon Sep 17 00:00:00 2001 | ||
| 2 | From: "John M. Schanck" <jschanck@mozilla.com> | ||
| 3 | Date: Thu, 13 Apr 2023 17:43:46 +0000 | ||
| 4 | Subject: [PATCH] Bug 1826650 - cmd/ecperf: fix dangling pointer warning on gcc | ||
| 5 | 13. r=djackson | ||
| 6 | |||
| 7 | Differential Revision: https://phabricator.services.mozilla.com/D174822 | ||
| 8 | |||
| 9 | --HG-- | ||
| 10 | extra : moz-landing-system : lando | ||
| 11 | --- | ||
| 12 | cmd/ecperf/ecperf.c | 12 ++++++++++++ | ||
| 13 | 1 file changed, 12 insertions(+) | ||
| 14 | |||
| 15 | diff --git a/cmd/ecperf/ecperf.c b/cmd/ecperf/ecperf.c | ||
| 16 | index 705d68f35..a07004d8e 100644 | ||
| 17 | --- a/cmd/ecperf/ecperf.c | ||
| 18 | +++ b/cmd/ecperf/ecperf.c | ||
| 19 | @@ -53,6 +53,7 @@ PKCS11Thread(void *data) | ||
| 20 | SECItem sig; | ||
| 21 | CK_SESSION_HANDLE session; | ||
| 22 | CK_RV crv; | ||
| 23 | + void *tmp = NULL; | ||
| 24 | |||
| 25 | threadData->status = SECSuccess; | ||
| 26 | threadData->count = 0; | ||
| 27 | @@ -68,6 +69,7 @@ PKCS11Thread(void *data) | ||
| 28 | if (threadData->isSign) { | ||
| 29 | sig.data = sigData; | ||
| 30 | sig.len = sizeof(sigData); | ||
| 31 | + tmp = threadData->p2; | ||
| 32 | threadData->p2 = (void *)&sig; | ||
| 33 | } | ||
| 34 | |||
| 35 | @@ -79,6 +81,10 @@ PKCS11Thread(void *data) | ||
| 36 | } | ||
| 37 | threadData->count++; | ||
| 38 | } | ||
| 39 | + | ||
| 40 | + if (threadData->isSign) { | ||
| 41 | + threadData->p2 = tmp; | ||
| 42 | + } | ||
| 43 | return; | ||
| 44 | } | ||
| 45 | |||
| 46 | @@ -89,6 +95,7 @@ genericThread(void *data) | ||
| 47 | int iters = threadData->iters; | ||
| 48 | unsigned char sigData[256]; | ||
| 49 | SECItem sig; | ||
| 50 | + void *tmp = NULL; | ||
| 51 | |||
| 52 | threadData->status = SECSuccess; | ||
| 53 | threadData->count = 0; | ||
| 54 | @@ -96,6 +103,7 @@ genericThread(void *data) | ||
| 55 | if (threadData->isSign) { | ||
| 56 | sig.data = sigData; | ||
| 57 | sig.len = sizeof(sigData); | ||
| 58 | + tmp = threadData->p2; | ||
| 59 | threadData->p2 = (void *)&sig; | ||
| 60 | } | ||
| 61 | |||
| 62 | @@ -107,6 +115,10 @@ genericThread(void *data) | ||
| 63 | } | ||
| 64 | threadData->count++; | ||
| 65 | } | ||
| 66 | + | ||
| 67 | + if (threadData->isSign) { | ||
| 68 | + threadData->p2 = tmp; | ||
| 69 | + } | ||
| 70 | return; | ||
| 71 | } | ||
| 72 | |||
| 73 | -- | ||
| 74 | 2.40.1 | ||
| 75 | |||
diff --git a/meta-oe/recipes-support/nss/nss_3.51.1.bb b/meta-oe/recipes-support/nss/nss_3.51.1.bb index 721b38ddb6..af842ee67c 100644 --- a/meta-oe/recipes-support/nss/nss_3.51.1.bb +++ b/meta-oe/recipes-support/nss/nss_3.51.1.bb | |||
| @@ -44,6 +44,7 @@ SRC_URI = "http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/${VERSIO | |||
| 44 | file://CVE-2022-22747.patch \ | 44 | file://CVE-2022-22747.patch \ |
| 45 | file://CVE-2023-0767.patch \ | 45 | file://CVE-2023-0767.patch \ |
| 46 | file://0001-Bug-1812671-build-failure-while-implicitly-casting-S.patch;patchdir=nss \ | 46 | file://0001-Bug-1812671-build-failure-while-implicitly-casting-S.patch;patchdir=nss \ |
| 47 | file://0001-Bug-1826650-cmd-ecperf-fix-dangling-pointer-warning-.patch;patchdir=nss \ | ||
| 47 | " | 48 | " |
| 48 | 49 | ||
| 49 | SRC_URI[md5sum] = "6acaf1ddff69306ae30a908881c6f233" | 50 | SRC_URI[md5sum] = "6acaf1ddff69306ae30a908881c6f233" |
