Free sframe encoder context
Jens Remus
jremus@linux.ibm.com
Wed Feb 11 13:17:16 GMT 2026
On 2/11/2026 6:04 AM, Alan Modra wrote:
> Like the patch to free sframe decoder data, this also needs to ensure
> the function doing the free is passed the actual context address.
>
> bfd/
> * elf-sframe.c (_bfd_elf_write_section_sframe): Don't pass
> address of local var to sframe_encoder_free, pass the actual
> context address.
> * elf64-s390.c (elf_s390_link_hash_table_free): New function.
> (elf_s390_link_hash_table_create): Set hash_table_free. Tidy
> zmalloc call.
> (_bfd_s390_elf_write_sframe_plt): Don't pass address of local
> var to sframe_encoder_free, pass the actual context address.
> * elflink.c: Include sframe-api.h.
> (_bfd_elf_link_hash_table_free): Free sframe encoder data.
> * elfxx-x86.c (elf_x86_link_hash_table_free): Likewise.
> (_bfd_x86_elf_write_sframe_plt): Don't pass address of local
> var to sframe_encoder_free, pass the actual context address.
> libsframe/
> * sframe.c (sframe_encode): Free context on error return path.
LGTM. Thank you for fixing and taking care of s390 as well!
Regards,
Jens
--
Jens Remus
Linux on Z Development (D3303)
jremus@de.ibm.com / jremus@linux.ibm.com
IBM Deutschland Research & Development GmbH; Vorsitzender des Aufsichtsrats: Wolfgang Wendt; Geschäftsführung: David Faller; Sitz der Gesellschaft: Ehningen; Registergericht: Amtsgericht Stuttgart, HRB 243294
IBM Data Privacy Statement: https://www.ibm.com/privacy/
More information about the Binutils
mailing list