crt: remove mingw-w64 wrapper for _assert()
The purpose of `_assert` wrapper was to make `assert` usable when an Unicode
translation mode was enabled on stderr. At the time when this wrapper was added,
it was asumed that `_assert` does not return, when in fact it can.
It is important to keep in mind that after displaying the message, `_assert`
terminates the process by calling `abort`; it is possible to escape from `abort`
by setting signal handler for SIGABRT which calls `longjmp`.
If an application were to perform such escape, previous translation mode used on
stderr will not be restored and it will be left in `_O_TEXT` translation mode.
`_assert` is also called from mingw-w64 wrapper for `_wassert`, which allocates
memory using `malloc`; such escape from `_assert` would result in a memory leak.
To avoid issues descrived above, remove wrapper for `_assert`. Any application
that calls `_assert` directly must take its limitations into account.
This change effectively reverts b2c3c92b542df57ed8bfcd798928692e94a35308.
Signed-off-by: Kirill Makurin <maiddaisuki@outlook.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
41 files changed