[PATCH v1] strace: Enhance --string-limit/-s to remove max string length limit
Dmitry V. Levin
ldv at strace.io
Sun Jan 21 22:13:22 UTC 2024
On Sun, Jan 21, 2024 at 04:16:02PM +0530, Gautam Menghani wrote:
[...]
> @@ -1774,7 +1784,7 @@ print_array_ex(struct tcb *const tcp,
> if (cur == start_addr)
> tprint_array_begin();
>
> - if (cur >= abbrev_end) {
> + if (truncation_needed(cur, abbrev_end)) {
> tprint_more_data_follows();
> cur = end_addr;
> truncated = true;
How this change has been tested?
>From a very cursory look, this doesn't look correct: both cur
and abbrev_end are addresses pointing to the tracee's memory.
> diff --git a/tests/gen_tests.in b/tests/gen_tests.in
> index bf2bcb2f2..4ee039709 100644
> --- a/tests/gen_tests.in
> +++ b/tests/gen_tests.in
> @@ -1140,6 +1140,7 @@ trace_statfs test_trace_expr '' -e%statfs
> trace_statfs_like test_trace_expr '' -e%%statfs
> trie_test run_prog
> truncate
> +truncate -s inf
> truncate64
> ugetrlimit -a28 'QUIRK:START-OF-TEST-OUTPUT:ugetrlimit(0x10 /* RLIMIT_??? */, NULL)'
> umask -a11
I haven't looked into the test itself, but this is definitely not correct:
since different tests must have different names, you cannot have two tests
called "truncate".
--
ldv
More information about the Strace-devel
mailing list