[PATCH 2/2] powerpc: Fix stack buffer overflow in loader error messages (bug 34541)

Peter Bergner bergner@oss.tenstorrent.com
Thu Nov 19 18:03:11 GMT 2026


On 9/28/26 8:00 AM, Adhemerval Zanella wrote:
> Use _dl_exception_create_format instead string operation on a fixed
> buffer, which allocates a message of the exact size.
> 
> The powerpc32 and powerpc64 _dl_reloc_overflow implementations
> are consolidated and the powerpc32 message now says "reloc at" instead
> of "relocation at" (as on powerpc64).

I like consolidation when it reduces code duplication, standardizes error
messages and fixes bugs. :-)


> diff --git a/sysdeps/powerpc/dl-reloc_overflow.c b/sysdeps/powerpc/dl-reloc_overflow.c
> new file mode 100644
> index 00000000000..ed4760dd987
> --- /dev/null
> +++ b/sysdeps/powerpc/dl-reloc_overflow.c
> @@ -0,0 +1,40 @@
> +/* Relocation overflow reporting for POWER.
> +   Copyright (C) 1995-2026 Free Software Foundation, Inc.

This being a new file, shouldn't the date just be 2026?

Otherwise, this LGTM. 

Reviewed-by: Peter Bergner <bergner@tenstorrent.com>


Peter





More information about the Libc-alpha mailing list