diff options
author | Ronan Le Martret <ronan.lemartret@iot.bzh> | 2018-08-22 13:43:05 +0000 |
---|---|---|
committer | ronan Le Martret <ronan.lemartret@iot.bzh> | 2018-08-23 10:06:31 +0000 |
commit | 16d03b87304e2bcb01d97a560caf80ecd1d5afda (patch) | |
tree | 9f63800d5f18bd86e34b2cdd1e9652c56cbffefa /meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch | |
parent | 66d9349794b11b0bb557028e7aa084ea1246985a (diff) |
Port the latest version of valgrind
Some issues appear with the current version of valgrind on aarch64.
(valgrind exits due to an unhandled instruction)
An update of valgrind solves this problem.
I guess other platform need a update on valgrind too, so this port is
not gen3 exclusive.
This port uses the yocto
recipes(poky:7e7ee662f5dea4d090293045f7498093322802cc):
* with some fix on the patch.
* remove patch already merged in valgrind git.
Bug-AGL: SPEC-1677
Change-Id: Ibf467bee03487252f24ef046b9fe4e4ff6d389da
Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh>
Diffstat (limited to 'meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch')
-rw-r--r-- | meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch new file mode 100644 index 000000000..fa1344c85 --- /dev/null +++ b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch @@ -0,0 +1,68 @@ +From d103475875858ab8a2e6b53ce178bb2f63883d4c Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 5 Jul 2017 17:37:56 -0700 +Subject: [PATCH 3/3] tests/seg_override: Replace __modify_ldt() with syscall() + +__modify_ldt() is specific to glibc, replacing it with syscall() +makes it more portable. + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Submitted + + none/tests/x86-linux/seg_override.c | 15 ++++++--------- + 1 file changed, 6 insertions(+), 9 deletions(-) + +diff --git a/none/tests/x86-linux/seg_override.c b/none/tests/x86-linux/seg_override.c +index b7619c9..c89874b 100644 +--- a/none/tests/x86-linux/seg_override.c ++++ b/none/tests/x86-linux/seg_override.c +@@ -2,6 +2,8 @@ + #include <stdio.h> + #include <errno.h> + #include <string.h> ++#include <unistd.h> ++#include <syscall.h> + + /* Stuff from Wine. */ + +@@ -52,14 +54,11 @@ inline static unsigned int wine_ldt_get_limit( const LDT_ENTRY *ent ) + /* our copy of the ldt */ + LDT_ENTRY ldt_copy[8192]; + +-/* System call to set LDT entry. */ +-//extern int __modify_ldt (int, struct modify_ldt_ldt_s *, size_t); +-extern int __modify_ldt (int, void *, size_t); +- + void print_ldt ( void ) + { + int res; +- res = __modify_ldt( 0, ldt_copy, 8192*sizeof(LDT_ENTRY) ); ++ /* System call to set LDT entry. */ ++ res = syscall(SYS_modify_ldt, 0, ldt_copy, 8192*sizeof(LDT_ENTRY) ); + printf("got %d bytes\n", res ); + perror("error is"); + } +@@ -83,9 +82,6 @@ struct modify_ldt_ldt_s + unsigned int empty:25; + }; + +-/* System call to set LDT entry. */ +-//extern int __modify_ldt (int, struct modify_ldt_ldt_s *, size_t); +- + void set_ldt1 ( void* base ) + { + int stat; +@@ -102,7 +98,8 @@ void set_ldt1 ( void* base ) + ldt_entry.read_exec_only = 0; + ldt_entry.limit_in_pages = 0; + ldt_entry.seg_not_present = 0; +- stat = __modify_ldt (1, &ldt_entry, sizeof (ldt_entry)); ++ /* System call to set LDT entry. */ ++ stat = syscall(SYS_modify_ldt, 1, &ldt_entry, sizeof (ldt_entry)); + printf("stat = %d\n", stat); + } + +-- +2.13.2 + |