This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix invalid free of memory allocated during rtld init


On Tue, Jan 15, 2013 at 05:04:43PM +0100, Andreas Schwab wrote:
> Any memory allocated during rtld init cannot be freed.
> 
> Andreas.
> 
> 	[BZ #14293]
> 	* elf/dl-load.c (_dl_init_paths): Mark decomposed RUNPATH as
> 	non-freeable.
> 
> diff --git a/elf/dl-load.c b/elf/dl-load.c
> index 6e65980..a3aab8a 100644
> --- a/elf/dl-load.c
> +++ b/elf/dl-load.c
> @@ -797,6 +797,7 @@ _dl_init_paths (const char *llp)
>  			   (const void *) (D_PTR (l, l_info[DT_STRTAB])
>  					   + l->l_info[DT_RUNPATH]->d_un.d_val),
>  			   l, "RUNPATH");
> +	  l->l_runpath_dirs.malloced = 0;
>  
>  	  /* The RPATH is ignored.  */
>  	  l->l_rpath_dirs.dirs = (void *) -1;

The fix is correct.
Could you also apply it to 2.17 and 2.16 branches, please?


-- 
ldv

Attachment: pgp00000.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]