[Bug dynamic-link/32897] pthread_getattr_np fails with executable stack
adhemerval.zanella at linaro dot org
sourceware-bugzilla@sourceware.org
Wed Apr 23 16:49:37 GMT 2025
https://sourceware.org/bugzilla/show_bug.cgi?id=32897
--- Comment #8 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
(In reply to Sam James from comment #7)
> (In reply to Adhemerval Zanella from comment #4)
> > (In reply to Luke Drummond from comment #2)
> > > git bisect is pointing its finger at
> > > 12a497c716f0a06be5946cabb8c3ec22a079771e. I'll see if I can understand
> > > what's going on there
> >
> > So previously make_main_stack_executable clear the stack_endp which pointers
> > to a temporary variable created before the call of _dl_map_object_from_fd
> > _dl_map_object; while now we use the __libc_stack_end directly.
> >
> > I think there is no need to clear the value and I am not sure why the
> > original code did (since it was always used on temporary value and it was
> > not checked after the _dl_map_object call anyway).
>
> It goes back to:
>
> commit eec8b6cae586451deadf30c371f7b5e4c9d573d1
> Author: Ulrich Drepper <drepper@redhat.com>
> Date: Sat Mar 27 03:40:33 2004 +0000
>
> Update.
>
> [...]
>
> and Florian already cleaned up some of the changes from that in:
>
> commit 52a01100ad011293197637e42b5be1a479a2f4ae
> Author: Florian Weimer <fweimer@redhat.com>
> Date: Wed Feb 21 10:37:22 2018 +0100
>
> elf: Remove ad-hoc restrictions on dlopen callers [BZ #22787]
> [...]
>
> I can't see a reason to keep it either. It's also useless for another reason
> because if the pointer did matter, it still exists in the non-execstack case.
Right, I was not aware of Florian`s cleanup and it make sense to just remove
the pointer zero. Let me prepare a patch.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list