diff options
| author | Zang Ruochen <zangrc.fnst@cn.fujitsu.com> | 2019-10-21 11:13:30 +0800 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2019-10-21 04:44:10 -0700 |
| commit | 81f0a3c12f44e72ee91b0b0654956bbd05df7b0e (patch) | |
| tree | ee517deec2046ca5f20af24334bb64e94338e5b4 | |
| parent | 9294da37f820a898c556c4db2b3b855703bef5fe (diff) | |
| download | meta-openembedded-81f0a3c12f44e72ee91b0b0654956bbd05df7b0e.tar.gz | |
ltrace:Bug fix for data type length judgment
...
if (byte_size == sizeof(long)) {
*type = is_signed ? ARGTYPE_LONG : ARGTYPE_ULONG;
return true;
}
...
If ltrace's target command has a dbg package, ltrace will look for the debug file and analyze its contents.
Ltrace determines the type of analysis result variable. The type of the variable is longlong.
On 32-bit systems, longlong is 8 and long is 4 (same as in).
An error occurred because the ltrace code did not process a variable of length 8.
Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com>
Signed-off-by: Wang Mingyu <wangmy.fnst@cn.fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | meta-oe/recipes-devtools/ltrace/ltrace/0001-Bug-fix-for-data-type-length-judgment.patch | 42 | ||||
| -rw-r--r-- | meta-oe/recipes-devtools/ltrace/ltrace_git.bb | 1 |
2 files changed, 43 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/0001-Bug-fix-for-data-type-length-judgment.patch b/meta-oe/recipes-devtools/ltrace/ltrace/0001-Bug-fix-for-data-type-length-judgment.patch new file mode 100644 index 0000000000..98cc9ba907 --- /dev/null +++ b/meta-oe/recipes-devtools/ltrace/ltrace/0001-Bug-fix-for-data-type-length-judgment.patch | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | From 5226333bddb755dbefd780d31450e0238dd5d3bd Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Zang Ruochen <zangrc.fnst@cn.fujitsu.com> | ||
| 3 | Date: Wed, 16 Oct 2019 08:24:23 +0900 | ||
| 4 | Subject: [PATCH] Bug fix for data type length judgment. | ||
| 5 | |||
| 6 | ... | ||
| 7 | if (byte_size == sizeof(long)) { | ||
| 8 | |||
| 9 | *type = is_signed ? ARGTYPE_LONG : ARGTYPE_ULONG; | ||
| 10 | |||
| 11 | return true; | ||
| 12 | |||
| 13 | } | ||
| 14 | ... | ||
| 15 | |||
| 16 | If ltrace's target command has a dbg package, ltrace will look for the debug file and analyze its contents. | ||
| 17 | Ltrace determines the type of analysis result variable. The type of the variable is longlong. | ||
| 18 | On 32-bit systems, longlong is 8 and long is 4 (same as in). | ||
| 19 | An error occurred because the ltrace code did not process a variable of length 8. | ||
| 20 | |||
| 21 | Upstream-Status: Pending | ||
| 22 | Signed-off-by: Wang Mingyu <wangmy.fnst@cn.fujitsu.com> | ||
| 23 | --- | ||
| 24 | dwarf_prototypes.c | 2 +- | ||
| 25 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 26 | |||
| 27 | diff --git a/dwarf_prototypes.c b/dwarf_prototypes.c | ||
| 28 | index bfac177..9887d4b 100644 | ||
| 29 | --- a/dwarf_prototypes.c | ||
| 30 | +++ b/dwarf_prototypes.c | ||
| 31 | @@ -190,7 +190,7 @@ static bool get_integer_base_type(enum arg_type *type, int byte_size, | ||
| 32 | return true; | ||
| 33 | } | ||
| 34 | |||
| 35 | - if (byte_size == sizeof(long)) { | ||
| 36 | + if (byte_size == sizeof(long long)) { | ||
| 37 | *type = is_signed ? ARGTYPE_LONG : ARGTYPE_ULONG; | ||
| 38 | return true; | ||
| 39 | } | ||
| 40 | -- | ||
| 41 | 2.7.4 | ||
| 42 | |||
diff --git a/meta-oe/recipes-devtools/ltrace/ltrace_git.bb b/meta-oe/recipes-devtools/ltrace/ltrace_git.bb index ead637cb7e..5c4e7c5b85 100644 --- a/meta-oe/recipes-devtools/ltrace/ltrace_git.bb +++ b/meta-oe/recipes-devtools/ltrace/ltrace_git.bb | |||
| @@ -28,6 +28,7 @@ SRC_URI = "git://github.com/sparkleholic/ltrace.git;branch=master;protocol=http | |||
| 28 | file://0001-move-fprintf-into-same-block-where-modname-and-symna.patch \ | 28 | file://0001-move-fprintf-into-same-block-where-modname-and-symna.patch \ |
| 29 | file://0001-hook-Do-not-append-int-to-std-string.patch \ | 29 | file://0001-hook-Do-not-append-int-to-std-string.patch \ |
| 30 | file://include_unistd_nr.patch \ | 30 | file://include_unistd_nr.patch \ |
| 31 | file://0001-Bug-fix-for-data-type-length-judgment.patch \ | ||
| 31 | " | 32 | " |
| 32 | S = "${WORKDIR}/git" | 33 | S = "${WORKDIR}/git" |
| 33 | 34 | ||
