]> sourceware.org Git - newlib-cygwin.git/commit
Revert "Cygwin: Make sure newer apps get uname_x even when loading uname dynamically"
authorCorinna Vinschen <corinna@vinschen.de>
Sun, 7 Mar 2021 11:17:57 +0000 (12:17 +0100)
committerCorinna Vinschen <corinna@vinschen.de>
Mon, 8 Mar 2021 09:33:30 +0000 (10:33 +0100)
commit582628d551e46754dedb53480ff05217409b55d2
tree2f4eb9e844941deb4c6aaf6ef4bd2d49a9427d0d
parent1debd4d635c291c6da904b9b4ffca08af05700e0
Revert "Cygwin: Make sure newer apps get uname_x even when loading uname dynamically"

This reverts commit 532b91d24e9496c7988b2b1dda7fc0e8b161f782.

It turned out that this patch has undesired side effects.  To wit, if a
newer, post-uname_x executable was linked against or loading an older,
pre-uname_x DLL, and this DLL called uname.  This call would jump into
the old uname with the old struct utsname as parameter, but given the
newer executable it would get redirected to uname_x.  uname_x in turn
would overwrite stack memory it should leave well alone, given it
expects the newer, larger struct utsname.

For the entire discussion see the thread starting at
https://cygwin.com/pipermail/cygwin/2021-February/247870.html
and continuing in March at
https://cygwin.com/pipermail/cygwin/2021-March/247930.html
For a description where we're coming from, see
https://cygwin.com/pipermail/cygwin/2021-March/247959.html

While we *could* make the scenario in question work by patching dlsym,
the problem would actually be the same, just for dynamic loading.  In
the end, we're missing the information, which Cygwin version has been
used when building DLLs.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
winsup/cygwin/include/cygwin/version.h
winsup/cygwin/uname.cc
This page took 0.029445 seconds and 5 git commands to generate.