criu/compel/plugins
Dmitry Safonov c39ed518f0 compel/log: Stop parsing at unknown format specifier
Currently if the specifier can't be parsed - error message is printed
and parsing of the format string continues. That's wrong as the argument
for the specifier will be used for the next specifier. I.e:
  pr_info("[%zu]`%s`\n", 0UL, "")
will crash PIE because %u is not known and the argument (0UL) will be
used for dereferencing string for %s.

Stop parsing printf position arguments at an unknown specifier.
Make this string visible so that `grep Error` in zdtm.py will catch it:

=[log]=> dump/zdtm/static/busyloop00/52/1/restore.log
------------------------ grep Error ------------------------
b'(00.001847) pie: 52: vdso: ['
b'Error: Unknown printf format %u'
------------------------ ERROR OVER ------------------------
Send the 15 signal to  52
Wait for zdtm/static/busyloop00(52) to die for 0.100000
======================= Test zdtm/static/busyloop00 PASS =======================

Reported-by: @ashwani29
Signed-off-by: Dmitry Safonov <dima@arista.com>
2021-09-03 10:31:00 -07:00
..
fds compel: Add fds plugin (v2) 2017-03-15 09:36:09 +03:00
include compel: rewrite parasite cmd and args manipulation from assembly to C 2020-10-20 00:18:24 -07:00
shmem Replace references to MAP_ANON with MAP_ANONYMOUS 2019-04-20 20:25:26 -07:00
std compel/log: Stop parsing at unknown format specifier 2021-09-03 10:31:00 -07:00
Makefile mips:compel: Enable mips in compel/ 2020-10-20 00:18:24 -07:00