2017-02-24 20:57:02 +01:00
|
|
|
What's new:
|
|
|
|
-----------
|
|
|
|
|
2017-03-06 18:54:42 +01:00
|
|
|
- New API: timingsafe_bcmp, timingsafe_memcmp
|
2017-02-24 20:57:02 +01:00
|
|
|
|
2017-03-06 19:30:45 +01:00
|
|
|
- New API: dladdr
|
|
|
|
|
2017-03-28 13:42:11 +02:00
|
|
|
- New API: getloadavg
|
|
|
|
|
|
|
|
|
2017-02-24 20:57:02 +01:00
|
|
|
What changed:
|
|
|
|
-------------
|
|
|
|
|
|
|
|
- cygcheck and strace now always generate output with Unix LF line endings,
|
|
|
|
rather than with DOS/Windows CR LF line endings.
|
|
|
|
|
Preserve order of dlopen'd modules in dll_list::topsort
This patch alters the behaviour of dll_list::topsort to preserve the
order of dlopen'd units.
The load order of unrelated DLLs is reversed every time fork is called,
since dll_list::topsort finds the tail of the list and then unwinds to
reinsert items. My change takes advantage of what should be undefined
behaviour in dll_list::populate_deps (ndeps non-zero and ndeps and deps
not initialised) to allow the deps field to be initialised prior to the
call and appended to, rather than overwritten.
All DLLs which have been dlopen'd have their deps list initialised with
the list of all previously dlopen'd units. These extra dependencies mean
that the unwind preserves the order of dlopen'd units.
The motivation for this is the FlexDLL linker used in OCaml. The FlexDLL
linker allows a dlopen'd unit to refer to symbols in previously dlopen'd
units and it resolves these symbols in DllMain before anything else has
initialised (including the Cygwin DLL). This means that dependencies may
exist between dlopen'd units (which the OCaml runtime system
understands) but which Windows is unaware of. During fork, the
process-level table which FlexDLL uses to get the symbol table of each
DLL is copied over but because the load order of dlopen'd DLLs is
reversed, it is possible for FlexDLL to attempt to access memory in the
DLL before it has been loaded and hence it fails with an access
violation. Because the list is reversed on each call to fork, it means
that a subsequent call to fork puts the DLLs back into the correct
order, hence "even" invocations of fork work!
An interesting side-effect is that this only occurs if the DLLs load at
their preferred base address - if they have to be rebased, then FlexDLL
works because at the time that the dependent unit is loaded out of
order, there is still in memory the "dummy" DONT_RESOLVE_DLL_REFERENCES
version of the dependency which, as it happens, will contain the correct
symbol table in the data section. For my tests, this initially appeared
to be an x86-only problem, but that was only because the two DLLs on x64
should have been rebased.
Signed-off-by: David Allsopp <david.allsopp@metastack.com>
2017-02-27 18:06:34 +01:00
|
|
|
- fork now preserves the load order of unrelated dlopen'd modules.
|
|
|
|
|
2017-03-07 15:18:03 +01:00
|
|
|
- pthread_cond_wait now acts like Linux and BSD: Resume waiting for the
|
|
|
|
condition variable as if it was not interrupted, rather than returning 0.
|
|
|
|
|
2017-03-28 13:42:11 +02:00
|
|
|
- The internal <sys/_locale.h> header was renamed to <xlocale.h> for
|
|
|
|
source compatibility with other systems.
|
|
|
|
|
|
|
|
- Try harder supporting Netapp drives.
|
|
|
|
|
2017-02-24 20:57:02 +01:00
|
|
|
|
|
|
|
Bug Fixes
|
|
|
|
---------
|
|
|
|
|
2017-03-10 20:50:35 +01:00
|
|
|
- Fix a few problems which are the combined culprit of fork failing
|
|
|
|
when called recursively from a pthread.
|
|
|
|
Addresses: https://cygwin.com/ml/cygwin/2017-03/msg00113.html
|
2017-03-11 10:01:47 +01:00
|
|
|
|
|
|
|
- Fix potential buffer overflow in getrandom.
|
2017-03-12 12:21:40 +01:00
|
|
|
|
|
|
|
- Fix write(2) return value for writes > 2 GB.
|
|
|
|
|
|
|
|
- Workaround Windows NUL having the same problem for writes > 4 GB.
|
|
|
|
Addresses: https://cygwin.com/ml/cygwin/2017-03/msg00144.html
|
2017-03-14 16:54:57 +01:00
|
|
|
|
|
|
|
- Fix a potential crash in duplocale.
|
|
|
|
Addresses: https://sourceware.org/ml/newlib/2017/msg00166.html
|
2017-03-21 14:30:24 +01:00
|
|
|
|
|
|
|
- Fix dlopen/dlclose reference counting to make sure FreeLibrary isn't
|
|
|
|
called too early in forked process.
|
|
|
|
Addresses: https://cygwin.com/ml/cygwin/2017-03/msg00220.html
|
2017-03-24 18:13:08 +01:00
|
|
|
|
|
|
|
- Fix concurrency problems in cygserver.
|
|
|
|
Addresses: https://cygwin.com/ml/cygwin/2017-03/msg00218.html
|