Jon TURNEY | 4 Aug 14:36 2015
Picon
Gravatar

[PATCH] Improve FAQ answer on debugging Cygwin

Improve FAQ answer on debugging Cygwin to mention the cygwin-debuginfo package
and the gdb command 'set cygwin-exceptions oon'.

2015-08-03  Jon Turney  <jon.turney <at> dronecode.org.uk>

	* faq-programming.xml: Improve debugging-cygwin answer.

Signed-off-by: Jon TURNEY <jon.turney <at> dronecode.org.uk>
---
 winsup/doc/ChangeLog           |  4 ++++
 winsup/doc/faq-programming.xml | 26 ++++++++++++++++++++++----
 2 files changed, 26 insertions(+), 4 deletions(-)

diff --git a/winsup/doc/ChangeLog b/winsup/doc/ChangeLog
index e3eb26f..9cff0e4 100644
--- a/winsup/doc/ChangeLog
+++ b/winsup/doc/ChangeLog
 <at>  <at>  -1,3 +1,7  <at>  <at> 
+2015-08-03  Jon Turney  <jon.turney <at> dronecode.org.uk>
+
+	* faq-programming.xml: Improve debugging-cygwin answer.
+
 2015-07-21  Corinna Vinschen  <corinna <at> vinschen.de>

 	* new-features.xml (ov-new2.2): Document sigsetjmp, siglongjmp.
diff --git a/winsup/doc/faq-programming.xml b/winsup/doc/faq-programming.xml
index 491da5d..0c936eb 100644
--- a/winsup/doc/faq-programming.xml
+++ b/winsup/doc/faq-programming.xml
 <at>  <at>  -747,14 +747,32  <at>  <at>  same time. Remove all but one.
(Continue reading)

Petrovski, Roman | 29 Jul 16:11 2015

RtlFillMemory fails on block sizes over 0x7fffffff

Hi, just ran into a problem which boils down to the following at least with Windows 7:

char *p = (char*)malloc(0x80000000UL);	//works fine, allocates memory as requested
memset(p, 0, 0x80000000UL);			//Watch process segfault.

The RtlFillMemory either crashes or underfills the buffer depending on the size given.
Looks like internally it treats size as a signed 4-byte integer.

Please apply the patch below or implement an alternative.

Roman.

From 60ed745b75d16755769653f19882335ef69960dd Mon Sep 17 00:00:00 2001
From: Roman Petrovski <rpetrovski <at> illumina.com>
Date: Wed, 29 Jul 2015 06:45:45 -0700
Subject: [PATCH] RtlFillMemory fails on block sizes over 0x7fffffff

---
 winsup/cygwin/miscfuncs.cc | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/winsup/cygwin/miscfuncs.cc b/winsup/cygwin/miscfuncs.cc
index 4a7a1b8..7308498 100644
--- a/winsup/cygwin/miscfuncs.cc
+++ b/winsup/cygwin/miscfuncs.cc
 <at>  <at>  -904,17 +904,35  <at>  <at>  err:
 extern "C" void NTAPI RtlFillMemory (PVOID, SIZE_T, BYTE);
 extern "C" void NTAPI RtlCopyMemory (PVOID, const VOID *, SIZE_T);

+
(Continue reading)

Michael Haubenwallner | 24 Jul 17:43 2015

[PATCH] winsup/cygwin: Protect fork() against dll- and exe-updates.

Hi!

When starting to port Gentoo Prefix to Cygwin, the first real problem
discovered is that fork() does use the original executable's location
to Create the child's Process, probably finding linked dlls that just
have emerged in the current directory (sth. like /my/prefix/usr/bin),
causing "Loaded different DLL with same basename in forked child" errors.

Diving into the details, I'm coming up with (a patch-draft based on) the
idea to create hardlinks for the binaries-in-use into some cygwin-specific
directory, like \proc\<ntpid>\object\ ('ve seen this name on AIX),
and use these hardlinks instead to create the new child's process.

Thoughts so far?

For now, when <cygroot>\proc\ directory does exist, the patch (roughly) does:

For /bin/bash.exe, cygwin1.dll creates these hardlinks at process startup:
  \proc\<ntpid>\object\bash.exe         -> /bin/bash.exe
  \proc\<ntpid>\object\bash.exe.local      (empty file for dll redirection)
  \proc\<ntpid>\object\cygwin1.dll      -> /bin/cygwin1.dll
  \proc\<ntpid>\object\cygreadline7.dll -> /bin/cygreadline7.dll

And frok::parent then does:

  CreateProcess("\proc\<ntpid>\object\bash.exe", "/bin/bash.exe", ...)

Resulting in another \proc\<ntpid>\object\ directory with same hardlinks.

While attached patch does work so far already, there's a few issues:
(Continue reading)

Jon TURNEY | 5 Jul 20:11 2015
Picon
Gravatar

[PATCH] winsup/doc: Add a configure test to find docbook2xtexi

Fedora installs docbook2texi under the name db2x_docbook2texi
Other distros and Cygwin install docbook2texi under the name docbook2x-texi

Add a configure test to find either.

2015-07-05  Jon Turney  <jon.turney <at> dronecode.org.uk>

	* configure.ac: Add check for DOCBOOK2XTEXI
	* configure: Regenerate.
	* Makefile.in (DOCBOOK2XTEXI): Use.

Signed-off-by: Jon TURNEY <jon.turney <at> dronecode.org.uk>
---
 winsup/doc/ChangeLog    |  6 ++++++
 winsup/doc/Makefile.in  |  2 +-
 winsup/doc/configure    | 44 ++++++++++++++++++++++++++++++++++++++++++++
 winsup/doc/configure.ac |  1 +
 4 files changed, 52 insertions(+), 1 deletion(-)

diff --git a/winsup/doc/ChangeLog b/winsup/doc/ChangeLog
index 841bbe2..b452fa9 100644
--- a/winsup/doc/ChangeLog
+++ b/winsup/doc/ChangeLog
 <at>  <at>  -1,3 +1,9  <at>  <at> 
+2015-07-05  Jon Turney  <jon.turney <at> dronecode.org.uk>
+
+	* configure.ac: Add check for DOCBOOK2XTEXI
+	* configure: Regenerate.
+	* Makefile.in (DOCBOOK2XTEXI): Use.
+
(Continue reading)

Jeffrey Walton | 1 Jul 03:38 2015
Picon

Using g++ and -m32 option on x86_64 broken

Cygwin's GCC responds to the -m32 option, but it causes a compile error:

   expected unqualified-id before ‘__int128’
       inline __int128

If the project does not support the -m32 option, then it should be
removes so that using it causes a compile error.

Below is the changed needed to get through the compile with -m32:

$ diff /usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/x86_64-pc-cygwin/bits/c++config.h
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/x86_64-pc-cygwin/bits/c++config.h.bu
1306,1308c1306
< #ifndef __CYGWIN32__      /* -m32 used on x86_64 */
< # define _GLIBCXX_USE_INT128 1
< #endif
---
> #define _GLIBCXX_USE_INT128 1

************

And this project really needs a bug tracker...

Jon TURNEY | 22 Jun 16:39 2015
Picon
Gravatar

[PATCH 0/5] More cygwin-doc stuff

intro.1 and intro.3 man pages for Cygwin
Cygwin User's Guide and Cygwin API reference .info
A few documentation related cleanups.

Jon TURNEY (5):
  winsup/doc: Create info pages from cygwin documentation
  winsup/doc: Add intro man pages from cygwin-doc
  winsup/doc: Remove 'Usage' prefix from synopses
  winsup/doc: Use xidepend to generate the source list for FAQ targets
    as well
  winsup/doc: Update ancient README about building documentation

 winsup/doc/ChangeLog         |  26 ++++++
 winsup/doc/Makefile.in       |  40 +++++++--
 winsup/doc/README            |  23 +----
 winsup/doc/cygwin-api.xml    |   3 +
 winsup/doc/cygwin-ug-net.xml |   3 +
 winsup/doc/intro.xml         | 196 +++++++++++++++++++++++++++++++++++++++++++
 winsup/doc/ntsec.xml         |  18 +++-
 winsup/doc/utils.xml         |  88 +++++++++----------
 8 files changed, 321 insertions(+), 76 deletions(-)
 create mode 100644 winsup/doc/intro.xml

--

-- 
2.1.4

Jon TURNEY | 17 Jun 14:37 2015
Picon
Gravatar

[PATCH 0/5] Generate cygwin-api manpages

This patch set changes the DocBook source XML for the Cygwin API reference to 
use refentry elements, and also generates man pages from that.

Again, note that after this, the chunked html now has a page for each function, 
rather than one containing all functions.

Jon TURNEY (5):
  winsup/doc: Rename cygwin.xsl as html.xsl
  winsup/doc: Generate ANSI rather than K&R style function prototypes
  winsup/doc: Convert cygwin-api function documentation to refentry
    elements
  winsup/doc: Make and install cygwin-api function manpages
  winsup/doc: Add man.xsl customization stylesheet

 winsup/doc/ChangeLog                |  28 ++++++
 winsup/doc/Makefile.in              |  31 ++++---
 winsup/doc/cygwin-api.xml           |   6 +-
 winsup/doc/fo.xsl                   |   3 +
 winsup/doc/{cygwin.xsl => html.xsl} |   5 +-
 winsup/doc/logon-funcs.xml          |  59 ++++++++++---
 winsup/doc/man.xsl                  |  13 +++
 winsup/doc/misc-funcs.xml           |  81 +++++++++++++----
 winsup/doc/path.xml                 | 172 +++++++++++++++++++++++++++---------
 9 files changed, 318 insertions(+), 80 deletions(-)
 rename winsup/doc/{cygwin.xsl => html.xsl} (85%)
 create mode 100644 winsup/doc/man.xsl

--

-- 
2.1.4

(Continue reading)

Christian Franke | 16 Jun 18:27 2015
Picon

[PATCH] Hide sethostname() in unistd.h

Found during an experimental build of busybox:

The sethostname() prototype in /usr/include/sys/unistd.h is enabled also 
on Cygwin.
It should be disabled because Cygwin does not provide this function.

Christian

Attachment (unistd-sethostname.patch): text/x-patch, 750 bytes
Jon TURNEY | 15 Jun 14:36 2015
Picon
Gravatar

[PATCH 0/8] Generate utilities manpages

Sorry about the patch-bomb.

Currently, the manpages in the cygwin-doc package are generated by a conversion 
from the DocBook XML by perl scripts with minimal understanding of the markup, 
which gives sub-optimal results.  I've been looking at doing that in a better 
way.

This patch set changes the DocBook source XML for the Cygwin utilities to use 
refentry entities, and also generates man pages from that.

Note that after this, the chunked html now has a page for each utility, rather 
than one containing all utilities.  This probably could be changed back with 
further stylesheet customization, but I'm not sure that's required.

Jon TURNEY (8):
  winsup/doc: Remove tarball target from .PHONY
  winsup/doc: Fix xidepend to handle relative pathnames
  winsup/doc: Some preparatory XML fixes
  winsup/doc: Use fo.xsl to customize PDF generation from DocBook XML
  winsup/doc: Convert utils.xml to using refentry
  winsup/doc: Make it easier to extend xidepend to more targets
  winsup/doc: Make and install manpages for utils
  winsup/doc: Fix an issue with parallel make

 winsup/doc/ChangeLog         |  46 +++
 winsup/doc/Makefile.in       |  40 +-
 winsup/doc/cygwin-ug-net.xml |   1 -
 winsup/doc/cygwin.xsl        |  13 +
 winsup/doc/fo.xsl            |  36 ++
 winsup/doc/utils.xml         | 852 ++++++++++++++++++++++++++++++-------------
(Continue reading)

Jon TURNEY | 10 Jun 14:05 2015
Picon
Gravatar

[PATCH] Improve strace to log most Windows debug events

Not sure if this is wanted, but on a couple of occasions recently I have been
presented with strace output which contains an exception at an address in an
unknown module (i.e. not in the cygwin DLL or the main executable), so here is a
patch which adds some more information, including DLL load addresses, to help
interpret such straces.

2015-06-07  Jon Turney  <jon.turney <at> dronecode.org.uk>

	* strace.cc (proc_child): Log process and thread create and exit,
	and DLL load and unload.
	(GetFileNameFromHandle): New function.
	* Makefile.in (strace.exe): Link against psapi.dll.

Signed-off-by: Jon TURNEY <jon.turney <at> dronecode.org.uk>
---
 winsup/utils/ChangeLog   |  7 ++++++
 winsup/utils/Makefile.in |  2 +-
 winsup/utils/strace.cc   | 58 ++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 66 insertions(+), 1 deletion(-)

diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog
index bfdb42a..7561a58 100644
--- a/winsup/utils/ChangeLog
+++ b/winsup/utils/ChangeLog
 <at>  <at>  -1,3 +1,10  <at>  <at> 
+2015-06-07  Jon Turney  <jon.turney <at> dronecode.org.uk>
+
+	* strace.cc (proc_child): Log process and thread create and exit,
+	and DLL load and unload.
+	(GetFileNameFromHandle): New function.
(Continue reading)

Jon TURNEY | 4 Jun 21:55 2015
Picon
Gravatar

[PATCH] winsup/doc: Remove ancient unused Makefile rules to make documentation tarball

This used to be used by cygwin-doc to make a tarball which would be used with a
ssh script to run docbook tools on a linux host since they weren't available on
Cygwin or something crazy like that...

2015-06-04  Jon Turney  <jon.turney <at> dronecode.org.uk>

	* Makefile.in: Remove ancient unused rules to make a documentation
	tarball.

Signed-off-by: Jon TURNEY <jon.turney <at> dronecode.org.uk>
---
 winsup/doc/ChangeLog   |  5 +++++
 winsup/doc/Makefile.in | 11 -----------
 2 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/winsup/doc/ChangeLog b/winsup/doc/ChangeLog
index 0c961fa..05d78a8 100644
--- a/winsup/doc/ChangeLog
+++ b/winsup/doc/ChangeLog
 <at>  <at>  -1,3 +1,8  <at>  <at> 
+2015-06-04  Jon Turney  <jon.turney <at> dronecode.org.uk>
+
+	* Makefile.in: Remove ancient unused rules to make a documentation
+	tarball.
+
 2015-06-01  Jon Turney  <jon.turney <at> dronecode.org.uk>

 	* ov-ex-unix.xml: Remove unhelpful mention of and inaccurate size
diff --git a/winsup/doc/Makefile.in b/winsup/doc/Makefile.in
index 8bf86f7..396d9bc 100644
(Continue reading)


Gmane