bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug libctf/27628] UBSAN error: binutils-gdb/libctf/ctf-serialize.c:852:


From: cvs-commit at gcc dot gnu.org
Subject: [Bug libctf/27628] UBSAN error: binutils-gdb/libctf/ctf-serialize.c:852:4:
Date: Thu, 25 Mar 2021 16:33:58 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=27628

--- Comment #6 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot 
gnu.org> ---
The master branch has been updated by Nick Alcock <nix@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=86f64bf43f70ecefa9232f5b8621b179dfff52fd

commit 86f64bf43f70ecefa9232f5b8621b179dfff52fd
Author: Nick Alcock <nick.alcock@oracle.com>
Date:   Thu Mar 25 16:32:46 2021 +0000

    libctf, serialize: functions with no args have a NULL dtd_vlen

    Every place that accesses a function's dtd_vlen accesses it only if the
    number of args is nonzero, except the serializer, which always tries to
    memcpy it.  The number of bytes it memcpys in this case is zero, but it
    is still undefined behaviour to copy zero bytes from a null pointer.
    So check for this case explicitly.

    libctf/ChangeLog
    2021-03-25  Nick Alcock  <nick.alcock@oracle.com>

            PR libctf/27628
            * ctf-serialize.c (ctf_emit_type_sect): Allow for a NULL vlen in
            CTF_K_FUNCTION types.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]