* [warrior][PATCH] nettle: fix the Segmentation fault
@ 2019-05-05 19:24 Adrian Bunk
2019-05-05 21:47 ` akuster808
0 siblings, 1 reply; 2+ messages in thread
From: Adrian Bunk @ 2019-05-05 19:24 UTC (permalink / raw)
To: openembedded-core
From: Mingli Yu <Mingli.Yu@windriver.com>
The commit[8ac8fa8ee1 nettle: update to 3.4.1]
add CFLAGS_append = " -std=c99" to silence the
below error for native build:
| ../nettle-3.4.1/rsa-sign-tr.c: In function 'sec_equal':
| ../nettle-3.4.1/rsa-sign-tr.c:243:3: error: 'for' loop initial declarations are only allowed in C99 mode
for (size_t i = 0; i < limbs; i++)
^
| ../nettle-3.4.1/rsa-sign-tr.c:243:3: note: use option -std=c99 or -std=gnu99 to compile your code
| Makefile:263: recipe for target 'rsa-sign-tr.o' failed
But the above change will trigger below Segmentation
fault:
# echo -n passwd| nettle-pbkdf2 -i 1 -l 16 salt
[65534.886509] nettle-pbkdf2[708]: segfault at 1f594260 ip 00007f3332256998 sp 00007fff60d44410 error 4 in libnettle.so.6.5[7f3332244000+1d00]
[65534.887525] Code: e8 6d db fe ff 44 01 6d 68 48 83 c4 08 5b 5d 41 5c 41 5d 41 5e 41 5f c3 66 2e 0f 1f 84 00 00 00 00 00 49 89 dc e9 68 ff f
Segmentation fault
So update the logic to CFLAGS_append = " -std=gnu99"
to fix the issue.
(From OE-Core rev: 91359a91b8c89dc5e1f3a946137204156c47a3af)
Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
meta/recipes-support/nettle/nettle_3.4.1.bb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/recipes-support/nettle/nettle_3.4.1.bb b/meta/recipes-support/nettle/nettle_3.4.1.bb
index dd49c30c84..8375fcf2df 100644
--- a/meta/recipes-support/nettle/nettle_3.4.1.bb
+++ b/meta/recipes-support/nettle/nettle_3.4.1.bb
@@ -30,7 +30,7 @@ inherit autotools ptest multilib_header
EXTRA_AUTORECONF += "--exclude=aclocal"
EXTRA_OECONF = "--disable-openssl"
-CFLAGS_append = " -std=c99"
+CFLAGS_append = " -std=gnu99"
do_compile_ptest() {
oe_runmake buildtest
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [warrior][PATCH] nettle: fix the Segmentation fault
2019-05-05 19:24 [warrior][PATCH] nettle: fix the Segmentation fault Adrian Bunk
@ 2019-05-05 21:47 ` akuster808
0 siblings, 0 replies; 2+ messages in thread
From: akuster808 @ 2019-05-05 21:47 UTC (permalink / raw)
To: Adrian Bunk, openembedded-core
On 5/5/19 12:24 PM, Adrian Bunk wrote:
> From: Mingli Yu <Mingli.Yu@windriver.com>
>
> The commit[8ac8fa8ee1 nettle: update to 3.4.1]
> add CFLAGS_append = " -std=c99" to silence the
> below error for native build:
> | ../nettle-3.4.1/rsa-sign-tr.c: In function 'sec_equal':
> | ../nettle-3.4.1/rsa-sign-tr.c:243:3: error: 'for' loop initial declarations are only allowed in C99 mode
> for (size_t i = 0; i < limbs; i++)
> ^
> | ../nettle-3.4.1/rsa-sign-tr.c:243:3: note: use option -std=c99 or -std=gnu99 to compile your code
> | Makefile:263: recipe for target 'rsa-sign-tr.o' failed
got it in stable/warrior-nmut
thanks,
Armin
>
> But the above change will trigger below Segmentation
> fault:
> # echo -n passwd| nettle-pbkdf2 -i 1 -l 16 salt
> [65534.886509] nettle-pbkdf2[708]: segfault at 1f594260 ip 00007f3332256998 sp 00007fff60d44410 error 4 in libnettle.so.6.5[7f3332244000+1d00]
> [65534.887525] Code: e8 6d db fe ff 44 01 6d 68 48 83 c4 08 5b 5d 41 5c 41 5d 41 5e 41 5f c3 66 2e 0f 1f 84 00 00 00 00 00 49 89 dc e9 68 ff f
> Segmentation fault
>
> So update the logic to CFLAGS_append = " -std=gnu99"
> to fix the issue.
>
> (From OE-Core rev: 91359a91b8c89dc5e1f3a946137204156c47a3af)
>
> Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> Signed-off-by: Adrian Bunk <bunk@stusta.de>
> ---
> meta/recipes-support/nettle/nettle_3.4.1.bb | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/recipes-support/nettle/nettle_3.4.1.bb b/meta/recipes-support/nettle/nettle_3.4.1.bb
> index dd49c30c84..8375fcf2df 100644
> --- a/meta/recipes-support/nettle/nettle_3.4.1.bb
> +++ b/meta/recipes-support/nettle/nettle_3.4.1.bb
> @@ -30,7 +30,7 @@ inherit autotools ptest multilib_header
> EXTRA_AUTORECONF += "--exclude=aclocal"
>
> EXTRA_OECONF = "--disable-openssl"
> -CFLAGS_append = " -std=c99"
> +CFLAGS_append = " -std=gnu99"
>
> do_compile_ptest() {
> oe_runmake buildtest
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-05-05 21:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-05 19:24 [warrior][PATCH] nettle: fix the Segmentation fault Adrian Bunk
2019-05-05 21:47 ` akuster808
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox