[Bug 289845] aarch64 libc timingsafe_memcmp has an ELF symbol size of 0

[email protected]
Newsgroups gmane.os.freebsd.devel.arm
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289845

            Bug ID: 289845
           Summary: aarch64 libc timingsafe_memcmp has an ELF symbol size
                    of 0
           Product: Base System
           Version: Unspecified
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: arm
          Assignee: [email protected]
          Reporter: [email protected]

I'm seeing errors with Valgrind on 15.3-ALPHA2

These are due to Valgrind not redirecting timingsafe_memcmp. Here is an extract
of the output of valgrind --trace-symtab=yes for libc.so timingsafe_bcmp
included for comparison.

raw symbol [ 122]: GLO FUN : svma 0x0000166c08, sz  348  timingsafe_bcmp
    rec(t) [ 122]:            val 0x0004a47c08, sz  348  timingsafe_bcmp

raw symbol [1355]: GLO FUN : svma 0x0000166d64, sz    0  timingsafe_memcmp
    ignore -- size=0: timingsafe_memcmp

You can see the same thing with readelf:

readelf -s /lib/libc.so.7 | grep timingsafe_m

  1355: 0000000000166d64     0 FUNC    GLOBAL DEFAULT    14 timingsafe_memcmp

Valgrind does not accept functions with a zero size for redirection, and this
is causing errors. Probably not too serious or frequent.

I see the cause of the error

https://github.com/freebsd/freebsd-src/blob/main/lib/libc/aarch64/string/timingsafe_memcmp.S

There is a copy and paste error at the end, using END(timingsafe_bcmp) instead
of END(timingsafe_memcmp)

-- 
You are receiving this mail because:
You are the assignee for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.