]> sourceware.org Git - newlib-cygwin.git/log
newlib-cygwin.git
23 months agoremove +x bit on source files
Mike Frysinger [Thu, 22 Dec 2022 03:38:57 +0000 (22:38 -0500)]
remove +x bit on source files

These should never be marked executable as they have no shebang and
are pure source files.

23 months agoCygwin: Makefile: Drop all the "test dll" considerations
Jon Turney [Wed, 21 Dec 2022 13:29:49 +0000 (13:29 +0000)]
Cygwin: Makefile: Drop all the "test dll" considerations

After 90236c3a2cf6, the testsuite is failing, as the cygwin0.dll
referenced by the implib that testsuite programs are linked with doesn't
exist anymore.

We don't need to make and link the testsuite with a specially named DLL,
as the cygwin DLL (since 526b0fbca377) takes into consideration the path
it's executing from to define separate "Cygwin installations", which
don't interact.

Fixes: 90236c3a2cf6 ("Cygwin: Makefile: build new-cygwin1.dll in a single step")
23 months agoCygwin: path_conv: make sure sym.path_flags is always initialized
Corinna Vinschen [Wed, 21 Dec 2022 12:08:39 +0000 (13:08 +0100)]
Cygwin: path_conv: make sure sym.path_flags is always initialized

Commit c1023ee353705 introduced a split between mount flags and
path flags.  It didn't initialize symlink_info::path_flags in
path_conv::check, because that's done in symlink_info::check.

However, there are two code paths expecting symlink_info::path_flags
being already initialized and both skip symlink_info::check.

Make sure symlink_info::path_flags is initalized to 0 early in
path_conv::check.

Fixes: c1023ee353705 ("Cygwin: path_conv: decouple path_types from mount types")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agoCygwin: configure: Add option to disable building 'dumper'
Jon Turney [Tue, 13 Dec 2022 23:17:48 +0000 (23:17 +0000)]
Cygwin: configure: Add option to disable building 'dumper'

Rather than guessing, based on just the presence of libbfd, add an
explicit configuration option, to build dumper or not, defaulting to
building it.

This might have some use when bootstrapping Cygwin for a new
architecture, or when building your own Cygwin-targetted cross-compiler,
rather than installing one from the copr, along with the dependencies of
libbfd.

23 months agoCygwin: FAQ: Mention configure options to build with reduced dependencies
Jon Turney [Tue, 13 Dec 2022 22:22:20 +0000 (22:22 +0000)]
Cygwin: FAQ: Mention configure options to build with reduced dependencies

23 months agoCygwin: x86_64: import swab.S from NetBSD
Corinna Vinschen [Tue, 20 Dec 2022 09:19:23 +0000 (10:19 +0100)]
Cygwin: x86_64: import swab.S from NetBSD

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agoCygwin: x86_64: import latest NetBSD bcopy.S
Corinna Vinschen [Tue, 20 Dec 2022 09:13:38 +0000 (10:13 +0100)]
Cygwin: x86_64: import latest NetBSD bcopy.S

Tweak slightly to allow implementing entire {w}mem{p}{cpy,move}
family:

Add WIDE macro processing for wmem* and POST macro processing for
memp* functions.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agoCygwin: x86_64: import memchr.S from NetBSD
Corinna Vinschen [Tue, 20 Dec 2022 09:09:01 +0000 (10:09 +0100)]
Cygwin: x86_64: import memchr.S from NetBSD

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agoCygwin: x86_64: import new memset.S from NetBSD
Corinna Vinschen [Tue, 20 Dec 2022 09:03:17 +0000 (10:03 +0100)]
Cygwin: x86_64: import new memset.S from NetBSD

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agoCygwin: add local machine/asm.h header
Corinna Vinschen [Tue, 20 Dec 2022 08:56:39 +0000 (09:56 +0100)]
Cygwin: add local machine/asm.h header

This header supports including BSD assembler sources.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agoCygwin: use .S suffix for assembler files
Corinna Vinschen [Mon, 19 Dec 2022 11:46:53 +0000 (12:46 +0100)]
Cygwin: use .S suffix for assembler files

Automake generates different recipies for .s.o vs. .S.o rules.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agoCygwin: check_reparse_point_target: fix comment format
Corinna Vinschen [Mon, 19 Dec 2022 11:47:42 +0000 (12:47 +0100)]
Cygwin: check_reparse_point_target: fix comment format

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agolibgloss: rs6000: fix incorrect install dir for xil files
Mike Frysinger [Wed, 14 Dec 2022 12:55:49 +0000 (07:55 -0500)]
libgloss: rs6000: fix incorrect install dir for xil files

The install steps were missing the multilib qualifier causing them
to always install in the same location and stomp each other.

23 months agolibgloss: merge arm configure script up a level
Mike Frysinger [Sat, 19 Feb 2022 03:38:41 +0000 (22:38 -0500)]
libgloss: merge arm configure script up a level

Move the minor arm-specific logic to a dedicated variable so we can
merge its configure logic up a level.

23 months agolibgloss: merge aarch64 configure script up a level
Mike Frysinger [Sat, 19 Feb 2022 03:14:13 +0000 (22:14 -0500)]
libgloss: merge aarch64 configure script up a level

Move the minor aarch64-specific logic to a dedicated variable so we can
merge its configure logic up a level.

23 months agolibgloss: drop unused multi-build logic
Mike Frysinger [Wed, 14 Dec 2022 02:12:02 +0000 (21:12 -0500)]
libgloss: drop unused multi-build logic

Now that aarch64 & arm have migrated off this, we can punt it.

23 months agolibgloss: arm: inline multi-build logic
Mike Frysinger [Wed, 14 Dec 2022 02:08:04 +0000 (21:08 -0500)]
libgloss: arm: inline multi-build logic

Since no other port uses this custom libgloss multi-build.in logic,
and it's making things difficult to unify, drop it all.  The set of
installed objects and their content should be the same.

There is a difference in the builds: currently we compile all the
objects in this subdir twice, but only a subset of them use a diff
set of flags, and are actually installed (the librdimon.a and its
objects).  So this change speeds things up by removing the duplicate
compilation.

There is a short term cost in having to duplicate the compile rules
for the files that are different, but this is minor when compared to
being able to delete the unused multi-build logic (which we'll do in
a sep commit), and we'll be able to clean this up when we move the
code to unified automake.

None of this should be confused with the common multilib logic.
This is *multi-build* which is processed in parallel.

23 months agolibgloss: aarch64: delete unused multi-build logic
Mike Frysinger [Wed, 14 Dec 2022 02:04:48 +0000 (21:04 -0500)]
libgloss: aarch64: delete unused multi-build logic

This logic looks like it was copied from the arm port, but it isn't
actually used here.  Since no other port uses this custom libgloss
multi-build.in logic, and it's making things difficult to unify,
and aarch64 isn't even using it, drop it all.  The set of installed
objects and their content should be the same.

Once we move this to unified automake, if we want to readd support
for subdir multi-builds, it'll be a lot easier as we can just add
another set of objects with custom flags.

None of this should be confused with the common multilib logic.
This *multi-build* which is processed in parallel.

23 months agolibc: arm: setjmp.S code cleanup
Victor L. Do Nascimento [Wed, 14 Dec 2022 16:46:33 +0000 (16:46 +0000)]
libc: arm: setjmp.S code cleanup

The code for setjmp and longjmp contains unconditionally-disabled
legacy FPA code.

Given the code is not used by any targets, remove the code.

23 months agoFix a bug in setjmp for MIPS o32/o64 FPXX/FP64
Giovanni Bajo [Sat, 17 Dec 2022 14:47:23 +0000 (15:47 +0100)]
Fix a bug in setjmp for MIPS o32/o64 FPXX/FP64

It seems there is a swapped logic in one of the subcases of
setjmp.S for MIPS: when the FPU registers are 64-bit within
a 32-bit aligned jmp_buf, the code realigns the pointers
before doing 64-bit writes, but the branch logic is swapped:
we must avoid the address adjustement when bit 2 is zero
(that is, the address is already 8-byte aligned).

This always triggers an address error when run, as tested
on a MIPS VR4300 with O64 ABI.

23 months agoFix 3 other instances of Reme typo (should be Remez)
Jeff Johnston [Fri, 16 Dec 2022 19:18:56 +0000 (14:18 -0500)]
Fix 3 other instances of Reme typo (should be Remez)

23 months agoRevert "amdgcn: Add vectorized math routines"
Jeff Johnston [Fri, 16 Dec 2022 17:28:48 +0000 (12:28 -0500)]
Revert "amdgcn: Add vectorized math routines"

This reverts commit 125e39bfea1a39341a60348c93a65cf4894e0f2a.

23 months agoFix a typo in the comment.
Nadav Rotem [Thu, 15 Dec 2022 03:53:47 +0000 (19:53 -0800)]
Fix a typo in the comment.

The implementation of expf() explains how approximation in the range [0 - 0.34] is done. The comment describes the "Reme" algorithm for constructing the polynomial. This is a typo and should be the "Remez" algorithm. The remez algorithm (or minimax) is used to calculate the coefficients of polynomials in other implementations of exp(0 and log().

See more:
https://en.wikipedia.org/wiki/Remez_algorithm

23 months agoamdgcn: Add vectorized math routines
Kwok Cheung Yeung [Fri, 2 Dec 2022 20:00:11 +0000 (20:00 +0000)]
amdgcn: Add vectorized math routines

This implements a set of vectorized math routines to be used by the
compiler auto-vectorizer.  Versions for vectors with 2 lanes up to
64 lanes (in powers of 2) are provided.

These routines are based on the scalar versions of the math routines in
libm/common, libm/math and libm/mathfp.  They make extensive use of the GCC
C vector extensions and GCN-specific builtins in GCC.

23 months agoCygwin: Update 3.4.3 release note
Jon Turney [Fri, 16 Dec 2022 10:34:38 +0000 (10:34 +0000)]
Cygwin: Update 3.4.3 release note

(cherry picked from commit 5366b3403c7008314ec45c1fff042d02df6be41e)

23 months agoRevert "Cygwin: x86_64: add wmemset assembler entry point"
Jon Turney [Fri, 16 Dec 2022 10:21:13 +0000 (10:21 +0000)]
Revert "Cygwin: x86_64: add wmemset assembler entry point"

This reverts commit 188d5f6c9ad5cbbd6f0fcb9aaf15bc9870597910.

(cherry picked from commit 98fa366cb68a0c297bbb4a64a2d86649709aeabb)

23 months agoCygwin: add release message for latest path handling patch
Corinna Vinschen [Wed, 14 Dec 2022 10:57:36 +0000 (11:57 +0100)]
Cygwin: add release message for latest path handling patch

5ba5e09b9d39 ("Cygwin: path handling: never substitute virtual drive with target path")

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agolibgloss: bfin: switch to CPPASCOMPILE for .S->.o
Mike Frysinger [Wed, 14 Dec 2022 09:07:12 +0000 (04:07 -0500)]
libgloss: bfin: switch to CPPASCOMPILE for .S->.o

We're compiling .S files, so use CPPAS instead of CC to compile since
the point of CPPAS is to preprocess+assemble .S files.

23 months agolibc: arm: fix setjmp abi non-conformance
Victor L. Do Nascimento [Tue, 13 Dec 2022 14:51:28 +0000 (14:51 +0000)]
libc: arm: fix setjmp abi non-conformance

As per the arm Procedure Call Standard for the Arm Architecture
section 6.1.2 [1], VFP registers s16-s31 (d8-d15, q4-q7) must be
preserved across subroutine calls.

The current setjmp/longjmp implementations preserve only the core
registers, with the jump buffer size too small to store the required
co-processor registers.

In accordance with the C Library ABI for the Arm Architecture
section 6.11 [2], this patch sets _JBTYPE to long long adjusting
_JBLEN to 20.

It also emits vfp load/store instructions depending on architectural
support, predicated at compile time on ACLE feature-test macros.

[1] https://github.com/ARM-software/abi-aa/blob/main/aapcs32/aapcs32.rst
[2] https://github.com/ARM-software/abi-aa/blob/main/clibabi32/clibabi32.rst

23 months agoCygwin: Makefile: build new-cygwin1.dll in a single step
Corinna Vinschen [Tue, 13 Dec 2022 12:28:16 +0000 (13:28 +0100)]
Cygwin: Makefile: build new-cygwin1.dll in a single step

The complicated build routine was only required because we needed
the .cygheap section at the end of the file, and the debug sections
broke this.  Now that the cygheap is out of the way, we really don't
have to do this anymore, and the build can just generate a DLL with
integrated debug info.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agoCygwin: Makefile: only regenerate cygwin_version.c if it changes
Corinna Vinschen [Tue, 13 Dec 2022 12:25:06 +0000 (13:25 +0100)]
Cygwin: Makefile: only regenerate cygwin_version.c if it changes

Make sure to create a new cygwin_version.c if it either doesn't
exist yet, or if it would be different from the former file.
This avoids unnecessary DLL rebuilding.

Fixes: 97eb64b909bc ("Cygwin: uname: generate default release string from git as well")
Fixes: 4949a82cde98 ("Cygwin: uname: fix building in non-git source dir")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agonewlib: info: tweak iconv node to avoid collisions
Mike Frysinger [Sat, 10 Dec 2022 08:27:58 +0000 (03:27 -0500)]
newlib: info: tweak iconv node to avoid collisions

We have "Iconv" and "iconv" nodes which generates Iconv.html and
iconv.html files.  On a case-insensitive filesystem, these collide.
Rename the "Iconv" node to match the chapter name that it's already
using to avoid the issue.

23 months agoCygwin: path handling: never substitute virtual drive with target path
Corinna Vinschen [Mon, 12 Dec 2022 20:56:14 +0000 (21:56 +0100)]
Cygwin: path handling: never substitute virtual drive with target path

Move the drive substitution code after the call to
GetFinalPathNameByHandleW into a local function revert_virtual_drive
and add code to handle non-remote virtual drives, i. e., those
created with the subst command.  (Try to) make sure that virtual
drives are never treated like symlinks.

Fixes: 19d59ce75d53 ("Cygwin: path_conv: Rework handling native symlinks as inner path components")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agoCygwin: add 3.4.2 release notes
Corinna Vinschen [Sun, 11 Dec 2022 10:45:30 +0000 (11:45 +0100)]
Cygwin: add 3.4.2 release notes

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agoCygwin: pty: Use GetTickCount64() instead of GetTickCount().
Takashi Yano [Fri, 9 Dec 2022 01:12:02 +0000 (10:12 +0900)]
Cygwin: pty: Use GetTickCount64() instead of GetTickCount().

Suggested-by: Corinna Vinschen <corinna@vinschen.de>
Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
23 months agoCygwin: pipe: Fix performance degradation for non-cygwin pipe.
Takashi Yano [Thu, 8 Dec 2022 13:02:43 +0000 (22:02 +0900)]
Cygwin: pipe: Fix performance degradation for non-cygwin pipe.

https://cygwin.com/pipermail/cygwin/2022-December/252628.html

After the commit 9e4d308cd592, the performance of read from non-cygwin
pipe has been degraded. This is because select_sem mechanism does not
work for non-cygwin pipe. This patch fixes the issue.

Fixes: 9e4d308cd592 ("Cygwin: pipe: Adopt FILE_SYNCHRONOUS_IO_NONALERT
flag for read pipe.")
Reported-by: tryandbuy <tryandbuy@proton.me>
Reviewed-by: Corinna Vinschen <corinna@vinschen.de>
Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
23 months agoCygwin: improve release text for FILE issue
Corinna Vinschen [Fri, 9 Dec 2022 11:41:54 +0000 (12:41 +0100)]
Cygwin: improve release text for FILE issue

Add a note in terms of 3.4.0 compatibility.

Suggested-by: Markus Mützel <markus.muetzel@gmx.de>
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agoCygwin: define FILE as struct __sFILE64, not as __sFILE
Corinna Vinschen [Thu, 8 Dec 2022 15:03:06 +0000 (16:03 +0100)]
Cygwin: define FILE as struct __sFILE64, not as __sFILE

Until Cygwin 3.3.6, we define __LARGE64_FILES unconditionally, so we
were using the type __sFILE64 even for 64 bit.  That was lazy and wrong.
so commit 2902b3a09e0a ("Cygwin: drop requirement to build newlib's
stdio64") tried to fix that.

Unfortunately this patch forgot to take the exposure of the typename
__sFILE64 in userspace into account.  This leads to trouble in C++ due
to name mangling.

Commit 0f376ae22036 tried to fix this by just renaming __sFILE to
__sFILE64 by using a macro.  While __sFILE and __sFILE64 are the same
size, they are not exactly congruent.

To avoid backward compatibility problems, make sure to define FILE
as the  real __sFILE64, and make sure that __sFILE is not defined at
all on Cygwin.

Fixes: 0f376ae22036 ("Cygwin: rename __sFILE to __sFILE64 for backward
compatibility")
Fixes: 2902b3a09e0a ("Cygwin: drop requirement to build newlib's stdio64")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agoCygwin: add __sFILE64 fix to 3.4.1 release notes
Corinna Vinschen [Thu, 8 Dec 2022 13:19:22 +0000 (14:19 +0100)]
Cygwin: add __sFILE64 fix to 3.4.1 release notes

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agoCygwin: rename __sFILE to __sFILE64 for backward compatibility
Corinna Vinschen [Thu, 8 Dec 2022 12:58:37 +0000 (13:58 +0100)]
Cygwin: rename __sFILE to __sFILE64 for backward compatibility

Until Cygwin 3.3.6, we define __LARGE64_FILES unconditionally, so we
were using the type __sFILE64 even for 64 bit.  That was lazy and wrong.
so commit 2902b3a09e0a ("Cygwin: drop requirement to build newlib's
stdio64") tried to fix that.

Unfortunately this patch forgot to take the exposure of the typename
__sFILE64 in userspace into account.  This leads to trouble in C++ due
to name mangling.

Fix this by redefining __sFILE to __sFILE64.  The type name is very much
internal, so it doesn't really matter, except for the fact that it needs
to stay backward compatible so as not to break building against C++ libs
built under older versions of Cygwin.

Fixes: 2902b3a09e0a ("Cygwin: drop requirement to build newlib's stdio64")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agoCygwin: drop unused local declaration of fopen64
Corinna Vinschen [Thu, 8 Dec 2022 12:04:03 +0000 (13:04 +0100)]
Cygwin: drop unused local declaration of fopen64

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agoCygwin: uname: fix building in non-git source dir
Corinna Vinschen [Wed, 7 Dec 2022 21:22:38 +0000 (22:22 +0100)]
Cygwin: uname: fix building in non-git source dir

commit 97eb64b909bc broke building outside of a git dir, because
the git describe command would fail.  Fix this by checking if
we're in a git tree at all and just generate an empty string
as version string.  Use this in uname_x to generate a fallback
version.

Fixes: 97eb64b909bc ("Cygwin: uname: generate default release
string from git as well"
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agoCygwin: uname: generate default release string from git as well
Corinna Vinschen [Wed, 7 Dec 2022 20:14:27 +0000 (21:14 +0100)]
Cygwin: uname: generate default release string from git as well

When building a release with cygport, we get uname version info
from cygport, which in turn gets version info from `git describe'.

During development, the release info for local builds was not
that helpful yet.  Fix that, by creating version info from
`git describe' if CYGPORT_RELEASE_INFO isn't given.  Make sure to
always force rebuild of the version info to pick up source file
changes as well as git actions.

Rearrange code slightly to generate machine info first, release info
after that.  Use snprintf to generate release string safely.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agoCygwin: add missing pragma
Corinna Vinschen [Wed, 7 Dec 2022 20:17:10 +0000 (21:17 +0100)]
Cygwin: add missing pragma

Add missing "#pragma GCC diagnostic push" to the pragma bracket
guarding the srandom call.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agolibc: fix fropen/fwopen compile warnings
Alexey Lapshin [Wed, 7 Dec 2022 10:59:23 +0000 (10:59 +0000)]
libc: fix fropen/fwopen compile warnings

This patch fixes warnings that appears when compiling:

#define fwopen(__cookie,__fn) funopen(__cookie, (int (*)())0, __fn,
(fpos_t (*)())0, (int (*)())0)
Expands to:

funopen(__null, (int (*)())0, &app_printf, (fpos_t (*)())0, (int
(*)())0)
argument of type "int (*)()" is incompatible with parameter of type
"int (*)(void *__cookie, char *__buf, int __n)"C/C++(167)
invalid conversion from 'fpos_t (*)()' {aka 'long int (*)()'} to
'fpos_t (*)(void*, fpos_t, int)' {aka 'long int (*)(void*,

Discussion is here:
https://github.com/espressif/arduino-esp32/issues/7407

23 months agoCygwin: link mcountFunc.o to libgmon.a
Corinna Vinschen [Wed, 7 Dec 2022 11:20:26 +0000 (12:20 +0100)]
Cygwin: link mcountFunc.o to libgmon.a

Commit 188d5f6c9ad5 erroneously moved the mcountFunc.S file to the
TARGET_FILES target, rather than keeping it in GMON_FILES.  The
result is that the __fentry__ entry point is now entirely undefined,
so `gcc -pg' is broken.

Create new target-specific GMON_TARGET_FILES and move mcountFunc.S
into it.  Add $(GMON_TARGET_FILES) to GMON_FILES.

Fixes: 188d5f6c9ad5 ("Cygwin: x86_64: add wmemset assembler entry point")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agoCygwin: Add 3.5.0 release file
Corinna Vinschen [Wed, 7 Dec 2022 11:19:49 +0000 (12:19 +0100)]
Cygwin: Add 3.5.0 release file

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agoCygwin: don't autoload some kernel32 functions
Corinna Vinschen [Tue, 15 Nov 2022 21:12:03 +0000 (22:12 +0100)]
Cygwin: don't autoload some kernel32 functions

DiscardVirtualMemory, PrefetchVirtualMemory and
GetSystemTimePreciseAsFileTime are available since
Windows 8.1.  Merge PseudoConsole functions into
kernel32 function block.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agoCygwin: drop special handling for SID authority 18
Corinna Vinschen [Tue, 15 Nov 2022 20:52:28 +0000 (21:52 +0100)]
Cygwin: drop special handling for SID authority 18

This was only required up to Windows 8.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agoCygwin: flock: drop checking for artificial console handles
Corinna Vinschen [Tue, 15 Nov 2022 20:51:14 +0000 (21:51 +0100)]
Cygwin: flock: drop checking for artificial console handles

They have been used up to Windows 7 only.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agoCygwin: fix a few comments mentioning Windows 7 or 8
Corinna Vinschen [Tue, 15 Nov 2022 20:50:13 +0000 (21:50 +0100)]
Cygwin: fix a few comments mentioning Windows 7 or 8

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agoCygwin: simplify FAST_CWD access
Corinna Vinschen [Tue, 15 Nov 2022 20:36:48 +0000 (21:36 +0100)]
Cygwin: simplify FAST_CWD access

Dropping Windows 7 and 8 also drops the need to handle three
different FAST_CWD structures.  Simplify code accordingly.

While at it, use dynamic allocation of the FAST_CWD structure
based on the length of the CWD path.  This may help in future
to enable working with systems and native apps with long paths
enabled (Win 10 1607 and later), see
https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry#enable-long-paths-in-windows-10-version-1607-and-later

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agoCygwin: drop wincaps for Windows 7 and Windows 8
Corinna Vinschen [Tue, 15 Nov 2022 16:59:44 +0000 (17:59 +0100)]
Cygwin: drop wincaps for Windows 7 and Windows 8

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agoCygwin: drop wincap::def_guard_pages
Corinna Vinschen [Tue, 15 Nov 2022 16:56:42 +0000 (17:56 +0100)]
Cygwin: drop wincap::def_guard_pages

Only required for Windows 7.  Define constant value
DEFAULT_GUARD_PAGE_COUNT instead.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agoCygwin: drop wincap::mmap_storage_high
Corinna Vinschen [Tue, 15 Nov 2022 16:46:52 +0000 (17:46 +0100)]
Cygwin: drop wincap::mmap_storage_high

Only required for Windows 7 and Windows 8.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agoCygwin: drop wincap::cons_need_small_input_record_buf
Corinna Vinschen [Tue, 15 Nov 2022 16:43:15 +0000 (17:43 +0100)]
Cygwin: drop wincap::cons_need_small_input_record_buf

Only required for Windows 7.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agoCygwin: drop wincap::has_broken_attach_console
Corinna Vinschen [Tue, 15 Nov 2022 16:39:10 +0000 (17:39 +0100)]
Cygwin: drop wincap::has_broken_attach_console

Only required for Windows 7.

This in turn allows to drop the helper_pid and related
methods from fhandler_pty_common.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agoCygwin: drop wincap::has_query_process_handle_info
Corinna Vinschen [Tue, 15 Nov 2022 16:22:43 +0000 (17:22 +0100)]
Cygwin: drop wincap::has_query_process_handle_info

Only required for Windows 7.

This allows to remove fhandler_pipe::get_query_hdl_per_system(),
too.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agoCygwin: drop wincap::has_broken_whoami
Corinna Vinschen [Tue, 15 Nov 2022 16:18:18 +0000 (17:18 +0100)]
Cygwin: drop wincap::has_broken_whoami

Unused for some time. Was only required for Windows 7 anyway.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agoCygwin: drop wincap::has_microsoft_accounts
Corinna Vinschen [Tue, 15 Nov 2022 16:15:44 +0000 (17:15 +0100)]
Cygwin: drop wincap::has_microsoft_accounts

Only required for Windows 7.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agoCygwin: drop wincap::has_precise_system_time
Corinna Vinschen [Tue, 15 Nov 2022 16:13:28 +0000 (17:13 +0100)]
Cygwin: drop wincap::has_precise_system_time

Only required for Windows 7.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agoCygwin: drop wincap::needs_query_information
Corinna Vinschen [Tue, 15 Nov 2022 16:10:57 +0000 (17:10 +0100)]
Cygwin: drop wincap::needs_query_information

Only required for Windows 7 and 8.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agoCygwin: bump DLL version to 3.5.0 cygwin-3.5.0-dev
Corinna Vinschen [Sun, 4 Dec 2022 12:51:30 +0000 (13:51 +0100)]
Cygwin: bump DLL version to 3.5.0

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agoCygwin: add release message for commit previous commit 8d138c3f66c2 cygwin-3.4.0
Corinna Vinschen [Sat, 3 Dec 2022 15:36:49 +0000 (16:36 +0100)]
Cygwin: add release message for commit previous commit 8d138c3f66c2

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agoCygwin: fix LC_CTYPE in global locale to be a real C.UTF-8 locale
Corinna Vinschen [Sat, 3 Dec 2022 15:16:15 +0000 (16:16 +0100)]
Cygwin: fix LC_CTYPE in global locale to be a real C.UTF-8 locale

https://cygwin.com/pipermail/cygwin/2022-December/252571.html

Cygwin's default locale is "C.UTF-8" as far as LC_CTYPE settings
are concerned.  However, while __global_locale contains fixed
mbtowc and wctomb pointers, the lc_ctype_T pointer is still pointing
to _C_ctype_locale, representing the standard "C" locale.

The problem with this is that the codeset name as well as MB_CUR_MAX
is wrong.

Fix this by introducing a new lc_ctype_T structure called
_C_utf8_ctype_locale, setting the default codeset to "UTF-8" and
MB_CUR_MAX to 6.  Use this as lc_ctype_T pointer in __global_locale
by default on Cygwin.

Fixes: a6a477fa8190 ("POSIX-1.2008 per-thread locales, groundwork part 1")
Co-Authored-By: Takashi Yano <takashi.yano@nifty.ne.jp>
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agoCygwin: add latest primary group changes to release notes
Corinna Vinschen [Sat, 3 Dec 2022 15:12:49 +0000 (16:12 +0100)]
Cygwin: add latest primary group changes to release notes

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agoCygwin: FAQ: convert ulinks to FAQ to xrefs
Corinna Vinschen [Fri, 2 Dec 2022 21:38:47 +0000 (22:38 +0100)]
Cygwin: FAQ: convert ulinks to FAQ to xrefs

Using ulinks here makes the result work on cygwin.com only, while
xrefs to FAQs are creating realtive links.  Add xreflabel where
appropriate.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agoCygwin: FAQ: describe test releases, deprecate developer snapshots
Corinna Vinschen [Fri, 2 Dec 2022 20:54:19 +0000 (21:54 +0100)]
Cygwin: FAQ: describe test releases, deprecate developer snapshots

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agoCygwin: uinfo: don't special case current user
Corinna Vinschen [Fri, 2 Dec 2022 15:49:47 +0000 (16:49 +0100)]
Cygwin: uinfo: don't special case current user

fetch_account_from_windows shortcuts the current user in that
it takes the user's domain SID and just adds the matching RID
from the token's primary group to create a group SID.

How wrong this is can be very simply reproduced:

Assuming you run a native process, like cmd, with primary group
set to the Administrators builtin group.  Run Cygwin's id(1) as
child process.  id(1) will print a non-existent group as primary
group and also add it to the group list.

This can only be avoided by not special casing the current user
and thus not creating a group SID from partial information.

Fixes: 6cc7c925ce86 ("(pwdgrp::fetch_account_from_windows): Default primary group for the
current user to primary group from user token.")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agoCygwin: uinfo: prefer token primary group
Corinna Vinschen [Fri, 2 Dec 2022 15:37:33 +0000 (16:37 +0100)]
Cygwin: uinfo: prefer token primary group

internal_getlogin overwrites the process token primary group if it
differs from the primary group as stored in the passwd DB.

However, this also overwrites the primary group of the process if
it has been deliberately changed by a former process (e. g., newgrp),
and the current process has a non-Cygwin process as parent.

Our docs claim we restrict overwriting the primary group to local,
non-domain user accounts anyway, and it was actually meant this way.

So check for exactly that before overwriting the primary group
in the token:  It's only allowed if the user is a local account
and the primary group in the token is still the default group
"None".

Fixes: 6cc7c925ce861 ("(internal_getlogin): Give primary group
from user token more weight.")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agoCygwin: uinfo: Drop long disabled nss_prefix and nss_separator
Corinna Vinschen [Fri, 2 Dec 2022 14:13:24 +0000 (15:13 +0100)]
Cygwin: uinfo: Drop long disabled nss_prefix and nss_separator

Originally the code was written to allow three ways of prefixing
accounts and to freely define a domain/account separator.  This code
has been disabled even before being officially released, and it was
never re-enabled. Given there has been no complaints for eight years
now, drop this code eventually.  Just add a macro to define the
domain/account separator statically.

Fixes: cc332c9e271b ("(cygheap_pwdgrp::nss_init_line): Disable db_prefix
and db_separator settings.  Add comment")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agoCygwin: exec: don't access cygheap before it's initialized
Corinna Vinschen [Thu, 1 Dec 2022 20:33:14 +0000 (21:33 +0100)]
Cygwin: exec: don't access cygheap before it's initialized

This is a long-standing thinko.

When you exec a process, dll_crt0_0 in the child process calls
child_info_spawn::handle_spawn().  handle_spawn() initialises the
cygheap.

Now consider calling strace.  Strace is a non-Cygwin process dynamically
loading cygwin1.dll via LoadLibrary.  This in turn initializes the DLL:

- dll_crt0_0 finds that the process it attaches to has been exec'd, so
  child_info_spawn::handle_spawn() is called.

- If the DLL is being dynamically loaded, handle_spawn() calls
  child_info_spawn::get_parent_handle().  This in turn tries to set
  the moreinfo->myself_pinfo value inside the cygheap to NULL.

- However, at this time, the cygheap has not yet been initialized.  This
  only occurs in the cygheap_fixup_in_child() call after get_parent_handle()
  returns.

--> SEGV

This thinko never had a negative side effect, because the cygheap was
pre-allocated at DLL load time until commit 2f9b8ff00cce ("Cygwin:
decouple cygheap from Cygwin DLL").  With 2f9b8ff00cce, the cygheap
actually doesn't exist until after the call to cygheap_fixup_in_child().

Fix this problem by moving the assignment after the call to
cygheap_fixup_in_child().

Fixes: 3de7be4c1deb ("* DevNotes: Add entry cgf-000007. [...]")
Fixes: 2f9b8ff00cce ("Cygwin: decouple cygheap from Cygwin DLL")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
23 months agoCygwin: multiple_cygwin_problem: drop obsolete check for "cygheap"
Corinna Vinschen [Thu, 1 Dec 2022 20:20:44 +0000 (21:20 +0100)]
Cygwin: multiple_cygwin_problem: drop obsolete check for "cygheap"

After decoupling cygheap from the DLL loading address, the check
for a different _cygheap_start has gone.  So the matching string
check in multiple_cygwin_problem is obsolete now.

Fixes: 2f9b8ff00cce ("Cygwin: decouple cygheap from Cygwin DLL")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2 years agoCygwin: serial: Fix a copy-paste error in DTR setup
Carlo Bramini [Tue, 29 Nov 2022 09:02:43 +0000 (10:02 +0100)]
Cygwin: serial: Fix a copy-paste error in DTR setup

In commit 2dab880c963ce0204c3513d664f610b587a3e6a6 I did a mistake when
I copied the new fhandler_serial::switch_modem_lines() from my modified
3.3.6 branch to the current master and I left a copy paste error. This
patch fixes that error.

Fixes: 2dab880c963c ("Cygwin: fix TIOCMBIS/TIOCMBIC not working when using usbser.sys")
2 years agoCygwin: Update some mentions of x86 in documentation
Jon Turney [Sun, 27 Nov 2022 13:50:19 +0000 (13:50 +0000)]
Cygwin: Update some mentions of x86 in documentation

2 years agoCygwin: Fix typo in FAQ
Jon Turney [Sat, 12 Nov 2022 14:16:36 +0000 (14:16 +0000)]
Cygwin: Fix typo in FAQ

The consonant in 'debug' is doubled in 'debuggee' just as it is in
'debugger'.

Fixes: 8c68a8a4
2 years agoCygwin: pty: Rename fhandler/tty.cc to fhandler/pty.cc.
Takashi Yano [Wed, 23 Nov 2022 23:30:16 +0000 (08:30 +0900)]
Cygwin: pty: Rename fhandler/tty.cc to fhandler/pty.cc.

- Previously, we have two tty.cc, one is winsup/cygwin/tty.cc and
  the other is winsup/cygwin/fhandler/tty.cc. This is somewhat
  confusing. This patch renames fhandler/tty.cc to fhandler/pty.cc.

2 years agoCygwin: uname: allow to specify external release info
Corinna Vinschen [Thu, 24 Nov 2022 11:23:09 +0000 (12:23 +0100)]
Cygwin: uname: allow to specify external release info

When creating regular Cygwin test releases we need a way to
automate unambiguous version information based on the output
of `git describe'.  Allow to inject a release string via a
preprocessor macro CYGPORT__RELEASE_INFO.  Change the default
release info to recognize a local, non-distro build.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2 years agoCygwin: drop snapshot handling
Corinna Vinschen [Thu, 24 Nov 2022 11:20:50 +0000 (12:20 +0100)]
Cygwin: drop snapshot handling

We're going to switch to regular test releases, rather than the
old, handcrafted snapshots method.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2 years agoamdgcn: Use __builtin_gcn_ in libc/machine/amdgcn/getreent.c
Tobias Burnus [Tue, 22 Nov 2022 13:53:48 +0000 (14:53 +0100)]
amdgcn: Use __builtin_gcn_ in libc/machine/amdgcn/getreent.c

Call __builtin_gcn_get_stack_limit and __builtin_gcn_first_call_this_thread_p
to reduce dependency on some register/layout assumptions by using the new
GCC mainline (GCC 13) builtins, if they are available. If not, the existing
code is used.

2 years agoamdgcn: Replace asm("s8") by __builtin_gcn_kernarg_ptr if existing
Tobias Burnus [Fri, 18 Nov 2022 08:50:20 +0000 (09:50 +0100)]
amdgcn: Replace asm("s8") by __builtin_gcn_kernarg_ptr if existing

Check whether __builtin_gcn_kernarg_ptr is available and, if it is,
call it instead using the hard-coded 'asm("s8")' in:
* newlib/libc/machine/amdgcn/exit-value.h (exit_with_int)
* newlib/libc/machine/amdgcn/mlock.c (sbrk)
* newlib/libc/sys/amdgcn/write.c (write)

 newlib/libc/machine/amdgcn/exit-value.h |  6 ++++++
 newlib/libc/machine/amdgcn/mlock.c      | 10 +++++++---
 newlib/libc/sys/amdgcn/write.c          |  4 ++++
 3 files changed, 17 insertions(+), 3 deletions(-)

2 years agoCygwin: pty, console: Encapsulate spawn.cc code related to pty/console.
Takashi Yano [Sat, 19 Nov 2022 08:28:15 +0000 (17:28 +0900)]
Cygwin: pty, console: Encapsulate spawn.cc code related to pty/console.

- The codes related to pty and console in spawn.cc have been moved
  into the new class fhandler_termios::spawn_worker, and make spawn.cc
  call them. The functionality has not been changed at all.

2 years agomakedocbook: Fix false report of unhandled texinfo command
Jon Turney [Sat, 29 Oct 2022 15:43:50 +0000 (16:43 +0100)]
makedocbook: Fix false report of unhandled texinfo command

During 'make man', makedocbook falsely reports "texinfo command
'@modifier' remains in output" while processing the setlocal(3) manpage,
which contains that literal string.

Move the check for unrecognized texinfo commands to before processing
'@@' (an escaped '@') in the texinfo source, and teach it to ignore
them.

Improve that check slightly, so it catches non-alphabetic texinfo
commands, of which there are few.

Now we don't have false positives, we can make unrecognized texinfo
commands fatal to manpage generation, rather than leaving them verbatim
in the generated manpage.

2 years agomakedocbook: Adjust inline whitespace to fix flake8 warnings
Jon Turney [Tue, 1 Nov 2022 11:35:51 +0000 (11:35 +0000)]
makedocbook: Adjust inline whitespace to fix flake8 warnings

2 years agomakedocbook: Drop stray semicolons
Jon Turney [Tue, 1 Nov 2022 11:37:00 +0000 (11:37 +0000)]
makedocbook: Drop stray semicolons

This isn't written in C :)

2 years agomakedocbook: Use sys.exit()
Jon Turney [Tue, 1 Nov 2022 11:21:21 +0000 (11:21 +0000)]
makedocbook: Use sys.exit()

Use sys.exit() to write a message to stderr and terminate with a
non-zero exit code.

2 years agomakedocbook: Use raw strings for regexes
Jon Turney [Tue, 1 Nov 2022 11:15:25 +0000 (11:15 +0000)]
makedocbook: Use raw strings for regexes

Use raw strings for regexes. This is best practice, and fixes a number
of "W605 invalid escape sequence" flakes.

2 years agoCygwin: document bugfix for USB CDC devices
Corinna Vinschen [Fri, 11 Nov 2022 12:09:45 +0000 (13:09 +0100)]
Cygwin: document bugfix for USB CDC devices

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2 years agoCygwin: fix TIOCMBIS/TIOCMBIC not working when using usbser.sys
Carlo Bramini [Fri, 11 Nov 2022 10:15:27 +0000 (11:15 +0100)]
Cygwin: fix TIOCMBIS/TIOCMBIC not working when using usbser.sys

In winsup/cygwin/fhandler/serial.cc, the function
fhandler_serial::switch_modem_lines() is called when TIOCMBIS/TIOCMBIC
are used in an ioctl() call.

This function uses EscapeCommFunction() for setting and resetting RTS
and DTR signals of a serial port.  Unfortunately, this function does not
work on USB CDC devices.

This is not a true bug of CYGWIN but an issue of the usbser.sys driver,
from Windows 2000 to the latest Windows 11.  Both 32bit and 64bit
versions of the operating system are affected.  Actually, I tested
EscapeCommFunction() also when using a real UART, based on the
traditional 16550 driver and it works fine.  Using thirdy party CDC
drivers, like the one provided by FTDI for their USB bridge chips,
probably also works.

However, it is also possible to drive the RTS/DTR signals by writing
their state with SetCommState(), which proved to be working fine all
types of connection.  This is also a better solution for handling these
signals since RTS/DTR can be set at the same time rather than having two
separate calls with a visible delay between them.

2 years agopowerpc/setjmp: Fix 64-bit buffer alignment
Sebastian Huber [Mon, 7 Nov 2022 13:33:42 +0000 (14:33 +0100)]
powerpc/setjmp: Fix 64-bit buffer alignment

The rlwinm is a word-size instruction which clears the remaining 32 bits of a
64-bit register.  Use clrrdi in 64-bit configurations.

2 years agoCygwin: Correct /proc/*/stat for processes without ctty
Andy Koppe [Wed, 9 Nov 2022 20:34:30 +0000 (20:34 +0000)]
Cygwin: Correct /proc/*/stat for processes without ctty

Report 0 instead of 268435455 (i.e. 0xFFFFFFF) in the tty field of
/proc/*/stat for processes without a controlling terminal. This is what
the procps utility expects when selecting or excluding such processes.

2 years agoGenerally make all 'long double complex' methods available in <complex.h>
Thomas Schwinge [Wed, 5 Oct 2022 20:11:41 +0000 (22:11 +0200)]
Generally make all 'long double complex' methods available in <complex.h>

..., not just '#if defined(__CYGWIN__)'.  (Exception: 'clog10l' which currently
indeed is for Cygwin only.)

This completes 2017-07-05 commit be3ca3947402827aa52709e677369bc7ad30aa1d
"Fixed warnings for some long double complex methods" after Aditya Upadhyay's
work on importing "Long double complex methods" from NetBSD.

For example, this changes GCC/nvptx libgfortran 'configure' output as follows:

    [...]
    checking for ccosf... yes
    checking for ccos... yes
    checking for ccosl... [-no-]{+yes+}
    [...]

..., and correspondingly GCC/nvptx 'nvptx-none/libgfortran/config.h' as
follows:

    [...]
     /* Define to 1 if you have the `ccosl' function. */
    -/* #undef HAVE_CCOSL */
    +#define HAVE_CCOSL 1
    [...]

Similarly for 'ccoshl', 'cexpl', 'cpowl', 'csinl', 'csinhl', 'ctanl', 'ctanhl',
'cacoshl', 'cacosl', 'casinhl', 'catanhl'.  ('conjl', 'cprojl' are not
currently being used in libgfortran.)

This in turn simplifies GCC/nvptx 'libgfortran/intrinsics/c99_functions.c'
compilation such that this files doesn't have to provide its own
"Implementation of various C99 functions" for those, when in fact they're
available in newlib libm.

2 years agoCygwin: Improve FAQ on early breakpoint for ASLR
Jon Turney [Tue, 1 Nov 2022 16:52:57 +0000 (16:52 +0000)]
Cygwin: Improve FAQ on early breakpoint for ASLR

gdb supports the 'disable-randomization' setting on Windows since [1]
(included in gdb 13).

https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=bcb9251f029da8dcf360a4f5acfa3b4211c87bb0;hp=8fea1a81c7d9279a6f91e49ebacfb61e0f8ce008

2 years agoCygwin: Handle out of order modules for module offsets in stackdump
Jon Turney [Tue, 1 Nov 2022 14:01:08 +0000 (14:01 +0000)]
Cygwin: Handle out of order modules for module offsets in stackdump

Improve address to module+offset conversion, to work correctly in the
presence of out-of-order elements in InMemoryOrderModuleList.

Fixes: d59651d4
2 years agostrftime/wcsftime: use STRLEN, not strlen
Corinna Vinschen [Sat, 29 Oct 2022 18:15:58 +0000 (20:15 +0200)]
strftime/wcsftime: use STRLEN, not strlen

Commit 737e2004a3bb accidentally introduced a call to strlen in
code used with wide character strings in case of wcsftime.  Use
STRLEN instead.

Fixes: 737e2004a3bb ("strftime.c(__strftime): add %q, %v, tests; tweak %Z doc")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2 years agomakedocbook: Add explicit locking for PLY parser table generation
Jon Turney [Fri, 28 Oct 2022 16:56:09 +0000 (17:56 +0100)]
makedocbook: Add explicit locking for PLY parser table generation

Drop 'makedocbook --cache' (any dependency on the man-cache rule which
invokes that was dropped by the non-recursive make changes)

Instead, add some explicit locking which prevents processes colliding
over the file containing generated python code for the parser table.

2 years agoCygwin: Add loaded module base address list to stackdump
Jon Turney [Fri, 28 Oct 2022 12:35:13 +0000 (13:35 +0100)]
Cygwin: Add loaded module base address list to stackdump

This adds an extra section to the stackdump, which lists the loaded
modules and their base address.  This is perhaps useful as it makes it
immediately clear if RandomCrashInjectedDll.dll is loaded...

Future work: It seems like the 'InMemoryOrder' part of
'InMemoryOrderModuleList' is a lie?

> Loaded modules
000100400000 segv-test.exe
7FFF2AC30000 ntdll.dll
7FFF29050000 KERNEL32.DLL
7FFF28800000 KERNELBASE.dll
000180040000 cygwin1.dll
7FFF28FA0000 advapi32.dll
7FFF29F20000 msvcrt.dll
7FFF299E0000 sechost.dll
7FFF29B30000 RPCRT4.dll
7FFF27C10000 CRYPTBASE.DLL
7FFF28770000 bcryptPrimitives.dll

2 years agoCygwin: Add addresses as module offsets in .stackdump file
Jon Turney [Fri, 28 Oct 2022 11:26:56 +0000 (12:26 +0100)]
Cygwin: Add addresses as module offsets in .stackdump file

This adds an additional column to the stack trace in a .stackdump file,
which gives the stack frame return address as a module name+offset. This
makes it a possible to convert the address to a function name without
having to guess what module the address belongs to.

> Stack trace:
> Frame         Function     Args
0007FFFFCC30  0001004010E9 (000180048055000180046FA000000000000200018031E160) segv-test.exe+0x10E9
0007FFFFCD30  0001800480C1 (000000000000000000000000000000000000000000000000) cygwin1.dll+0x80C1
0007FFFFFFF0  000180045C86 (000000000000000000000000000000000000000000000000) cygwin1.dll+0x5C86
0007FFFFFFF0  000180045D34 (000000000000000000000000000000000000000000000000) cygwin1.dll+0x5D34
> End of stack trace

Loosely based on this patch [1] by Brian Dessent.

[1] https://cygwin.com/pipermail/cygwin-patches/2008q1/006306.html

2 years agoCygwin: Tidy up formatting of stackdump
Jon Turney [Fri, 28 Oct 2022 12:43:54 +0000 (13:43 +0100)]
Cygwin: Tidy up formatting of stackdump

Resize stackdump headers for b9e97f58
Consistently use \r\n line endings

2 years agoCygwin: cygheap: make bucket_val a static const array
Corinna Vinschen [Fri, 28 Oct 2022 15:02:05 +0000 (17:02 +0200)]
Cygwin: cygheap: make bucket_val a static const array

Every time the cygheap is initialized, that is, on each fork
or exec, cygheap_init() *again* computes the bucket size values
and stores them in the cgyheap, albeit they are always the
same values anyway.

Make bucket_val a local const array, statically initialized
instead.

Fixes: 61522196c715 ("* Merge in cygwin-64bit-branch.)"
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This page took 0.079051 seconds and 5 git commands to generate.