[PATCH v8 0/6] glibc: Add SFrame support for stack backtracing

Sam James sam@gentoo.org
Mon Jul 14 08:10:50 GMT 2025


claudiu.zissulescu-ianculescu@oracle.com writes:

> From: Claudiu Zissulescu <claudiu.zissulescu-ianculescu@oracle.com>
>
> Hello,
>
> Please find the final SFrame patch series. All the patches were
> approved by DJ/Florian.
>
> I would like to thank for the review to all reviewers.
>
> Please consider this series to commit into mainline as I do not have
> rights to do so.

I can commit it on your behalf if you can add `Reviewed-by:` trailers to
each of the commits.

>
> Thank you,
> Claudiu
>
> ABI impact notes:
> * Changes in 'struct dl_find_object'
>  - A new member 'void *dlfo_sframe' is inserted to the structure.
>  
>  - The member '__dlfo_reserved' is changed, removing one element, which
>    is a decrease of 64bits.
>  
>  - The size of the type has not changed, as the new added field (i.e.,
>    dlfo_sframe) size is of the same size as of the one element removed
>    from struct memeber __dlfo_reserved. For 32bit systems, a padding is
>    added to compensate for pointer size change.
>
>  - A new macro DLF_SFRAME is introduced.  It helps controlling the
>    newly introduced flag bit in dlfo_flags member. This may implies
>    changing specific ABI tests (e.g. glibc: update
>    conform/data/dlfcn.h-data file)
>
>  - The function 'dl_find_object' is called within libc' backtrace
>    routine using GLRO macro, thus avoinding any PLT calls.
>  
> * Possible issues
>  - Automatic ABI checkers may mark this change as an ABI change, thus,
>    human review and updating of the scripts is required.
>  
>  - For unknown programs which directly access the '__dlfo_reserved'
>    field, this change is incompatible. As note, this field should not
>    be used by anyone as it is reserved for further changes of the
>    dl_find_object structure.
>
> Other observations:
>
>  - The SFrame backtracer is falling back to Dwarf unwinder if it
>    detects any posibility of a truncate trace.
>
>  - Compiling the x86 tst-quadmod1.S test file with --gsframe will hit
>    binutils' assembler Bug #32879.
>
> Thank you,
> Claudiu
>
>
> Claudiu Zissulescu (6):
>   elf: Add SFrame support to _dl_find_object function
>   x86: Add SFrame support for x86 architecture
>   aarch64: Add SFrame support for aarch64 architecture
>   elf: Add SFrame stack tracing
>   configure: Add --enable-sframe option
>   SFrame: Add tests that uses DWARF backtracer
>
>  INSTALL                                       |   5 +
>  Makeconfig                                    |   8 +-
>  NEWS                                          |   4 +
>  config.make.in                                |   1 +
>  configure                                     | 129 ++++
>  configure.ac                                  |  44 ++
>  debug/Makefile                                |  28 +
>  debug/backtrace.c                             |  46 +-
>  dlfcn/dlfcn.h                                 |  10 +-
>  elf/dl-find_object.h                          |  52 +-
>  manual/dynlink.texi                           |  17 +-
>  manual/install.texi                           |   5 +
>  sysdeps/generic/Makefile                      |   1 +
>  sysdeps/generic/sframe-read.c                 | 566 ++++++++++++++++++
>  sysdeps/generic/sframe-read.h                 | 106 ++++
>  sysdeps/generic/sframe.c                      | 187 ++++++
>  sysdeps/generic/sframe.h                      | 367 ++++++++++++
>  sysdeps/generic/uw-sigframe.h                 |  31 +
>  sysdeps/unix/sysv/linux/aarch64/uw-sigframe.h |  78 +++
>  sysdeps/unix/sysv/linux/x86_64/uw-sigframe.h  |  76 +++
>  20 files changed, 1743 insertions(+), 18 deletions(-)
>  create mode 100644 sysdeps/generic/sframe-read.c
>  create mode 100644 sysdeps/generic/sframe-read.h
>  create mode 100644 sysdeps/generic/sframe.c
>  create mode 100644 sysdeps/generic/sframe.h
>  create mode 100644 sysdeps/generic/uw-sigframe.h
>  create mode 100644 sysdeps/unix/sysv/linux/aarch64/uw-sigframe.h
>  create mode 100644 sysdeps/unix/sysv/linux/x86_64/uw-sigframe.h


More information about the Libc-alpha mailing list