On Wed, May 26, 2021 at 11:44 PM Dmitry Kozlyuk <dmitry.kozl...@gmail.com> wrote: > > Size of string constant symbol may be larger than its length > measured up to NUL terminator. In this case pmdinfogen included padding > bytes after NUL terminator in generated source, yielding incorrect code. > > Always trim string data to NUL terminator while reading ELF. > It was already done for COFF because there's no symbol size. > > Bugzilla ID: 720 > Fixes: f0f93a7adfee ("buildtools: use Python pmdinfogen") > > Signed-off-by: Dmitry Kozlyuk <dmitry.kozl...@gmail.com>
Reproduced the issue described in bz on my (old) RHEL7 with clang 3.4.2. Reviewed-by: David Marchand <david.march...@redhat.com> Just to confirm my reading of the C version of pmdinfogen: the C version formats those symbols fine with printf %s. So there should be no need for a fix in stable branches, right? -- David Marchand