summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix original stack when running signal handler on alternate stackCorinna Vinschen2015-07-048-134/+291
| | | | | | | | | | | | | | | | | | | | | | | | | | | * autoload.cc (SetThreadStackGuarantee): Import. * cygtls.h (struct _cygtls): Replace thread_context with a ucontext_t called context. * exceptions.cc (exception::handle): Exit from process via signal_exit in case sig_send returns from handling a stack overflow SIGSEGV. Explain why. (dumpstack_overflow_wrapper): Thread wrapper to create a stackdump from another thread. (signal_exit): Fix argument list to reflect three-arg signal handler. In case we have to create a stackdump for a stack overflow condition, do so from a separate thread. Explain why. (sigpacket::process): Don't run signal_exit on alternate stack. (altstack_wrapper): Wrapper function to do stack correction when calling the signal handler on an alternate stack to handle a stack overflow. Make sure to have lots of comments. (_cygtls::call_signal_handler): Drop local context variable to reduce stack pressure. Use this->context instead. Change inline assembler to call altstack_wrapper. (_cygtls::signal_debugger): Accommodate aforementioned change to struct _cygtls. * tlsoffset.h: Regenerate. * tlsoffset64.h: Regenerate. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Prevent use of uninitialized file lockSebastian Huber2015-07-023-4/+16
| | | | | | | | | | | | | | | The CHECK_INIT() is necessary before the _newlib_flockfile_start() since this would use otherwise acquire an uninitialized lock which gets initialized after this leading to a corrupt release. newlib/ChangeLog 2015-07-01 Sebastian Huber <sebastian.huber@embedded-brains.de> libc/stdio/fputs.c (_puts_r): Add missing CHECK_INIT(). libc/stdio/gets.c (_gets_r): Add missing _REENT_SMALL_CHECK_INIT() and CHECK_INIT(). Use _stdin_r() to get the file pointer instead of stdin. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Document previous changeCorinna Vinschen2015-07-011-0/+3
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Fix fork after recovered stack overflowCorinna Vinschen2015-07-012-2/+19
| | | | | | | * fork.cc (frok::parent): Set stacktop value based on requested stack pointer value in child. Explain why. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Add comment to sigaltstack to explain setting ss_flags hereCorinna Vinschen2015-06-302-0/+8
| | | | | | * signal.cc (sigaltstack): Add comment. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Regenerate Makefile.inJon TURNEY2015-06-297-5/+14
| | | | | | | | | | | | | | | Regenerate Makefile.in with changes in commits 153385d8 and 433aad91 2015-06-29 Jon Turney <jon.turney@dronecode.org.uk> * libc/ctype/Makefile.in: Regenerate. * libc/posix/Makefile.in: Ditto. * libc/stdio/Makefile.in: Ditto. * libc/stdio64/Makefile.in: Ditto. * libc/stdlib/Makefile.in: Ditto. * libc/string/Makefile.in: Ditto. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
* Handle ss_flags value longjmp safe.Corinna Vinschen2015-06-273-5/+18
| | | | | | | | | * exceptions.cc (_cygtls::call_signal_handler): Drop manipulating thread's ss_flags here. It's not safe against longjmp. * signal.cc (sigaltstack): Check if we're running on the alternate stack and set ss_flags returned in oss to SS_ONSTACK. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Define larger MINSIGSTKSZ and SIGSTKSZ values for CygwinCorinna Vinschen2015-06-262-0/+13
| | | | | | | | * include/cygwin/signal.h: Revert to define MINSIGSTKSZ and SIGSTKSZ here with bigger values to allow _cygtls to reside on signal stack, should it turn out to be required at one point. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Fix values returned by getrlimit(RLIMIT_STACK)Corinna Vinschen2015-06-262-10/+31
| | | | | | | * resource.cc (getrlimit): Fix values returned by RLIMIT_STACK. Explain why this had to be changed. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Use source files which have makedoc markup, but aren't processed or included.newlib-snapshot-20150623Jon TURNEY2015-06-2410-4/+34
| | | | | | | | | | | | | | | | | | | | | | | These source files have makedoc markup, but aren't listed to be chewed by makedoc. I am assuming that is accidental. Future work: Note that stdio/fseeko.c, stdio/ftello.c and common/s_isnand.c have makedoc markup, but duplicate stdio/fseek.c, stdio/ftell.c and common/s_isnan.c respectively. 2015-06-23 Jon Turney <jon.turney@dronecode.org.uk> * libc/ctype/Makefile.am (CHEWOUT_FILES): Add isblank.def. * libc/ctype/ctype.tex: Include isblank and add to menu. * libc/posix/Makefile.am (CHEWOUT_FILES): Add posix_spawn.def. * libc/posix/posix.tex: Include posix_spawn and add to menu. * libc/stdio64/Makefile.am (CHEWOUT_FILES): Add fdopen.def. * libc/stdio64/stdio64.tex: Include fdopen64 and add to menu. * libc/stdio64/fdopen64.c: Improve one-line description. * libc/string/Makefile.am (CHEWOUT_FILES): Add strchrnul.def. * libc/string/strings.tex: Include strchrnul and add to menu. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
* Use makedoc output files which are generated but aren't includedJon TURNEY2015-06-246-2/+33
| | | | | | | | | | | | | | | | | | | I think these are accidental omissions, as these source files are listed to be chewed by makedoc, but the result is not included by any texinfo source file. Future work: Nothing in libc/reent/ which is processed by makedoc is included by reent.tex 2015-06-23 Jon Turney <jon.turney@dronecode.org.uk> * libc/stdlib/stdlib.tex: Include itoa and utoa, and add to menu. * libc/string/strings.tex: Include memrchr and rawmemchr, and add to menu. * libm/math/math.tex: Include exp10 and pow10, and add to menu. * libm/common/s_exp10.c: Improve one-line description. * libm/common/s_exp10.c: Ditto. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
* Don't chew files which contain no documentation markupJon TURNEY2015-06-243-3/+6
| | | | | | | | | | | | | | | Don't chew files which contain no documentation markup. Neither of the alternatives for MALLOCR (mallocr.c or nano-mallocr.c) contain any documentation markup. 2015-06-23 Jon Turney <jon.turney@dronecode.org.uk> * libc/stdlib/Makefile.am (CHEWOUT_FILES): Remove $(MALLOCR).def. * libc/stdio/Makefile.am (CHEWOUT_FILES): Remove getwc.def and putwc.def. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
* Fix mismatched parentheses in documentation.Jon TURNEY2015-06-244-3/+10
| | | | | | | | | | | 2015-06-23 Jon Turney <jon.turney@dronecode.org.uk> * libc/locale/locale.c: Fix mismatched parentheses in documentation. * libc/locale/locale.tex: Ditto. * libc/stdio/fgetwc.c: Ditto. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
* Fix typo-ed function names in efgcvt.c documentationJon TURNEY2015-06-233-3/+9
| | | | | | | | | | | | | Fix typo-ed function names in efgcvt.c documentation, neither gvcvt nor gdvtf exists. 2015-06-23 Jon Turney <jon.turney@dronecode.org.uk> * libc/stdlib/efgcvt.c: Fix typo-ed function names in documentation. * libc/stdlib/stdlib.tex: Fix function name in menu to match. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
* Fix an inconsistent use of '.' in FUNCTIONJon TURNEY2015-06-232-1/+6
| | | | | | | | | | | | Fix an inconsistent use of '.' to separate function names in FUNCTION. ',' is used everywhere else. 2015-06-23 Jon Turney <jon.turney@dronecode.org.uk> * libc/stdio/fread.c: Fix inconsistent use of '.' to separate function names in FUNCTION mark up. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
* Fix SYNOPSIS prototypes without marked up parameter namesJon TURNEY2015-06-234-5/+11
| | | | | | | | | | 2015-06-23 Jon Turney <jon.turney@dronecode.org.uk> * libc/stdlib/llabs.c: Mark up parameter name in ANSI_SYNOPSIS. * libc/time/tzset.c: Add and mark up parameter in SYNOPSIS. * libm/common/s_nan.c: Ditto. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
* Correct a non-ANSI prototype in SYNOPSISJon TURNEY2015-06-232-1/+5
| | | | | | | | 2015-06-23 Jon Turney <jon.turney@dronecode.org.uk> * libc/stdio/getchar_u.c: Fix a non-ANSI prototype in SYNOPSIS. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
* Remove stray punctuation in ANSI_SYNOPSIS prototypesJon TURNEY2015-06-233-2/+8
| | | | | | | | | | 2015-06-23 Jon Turney <jon.turney@dronecode.org.uk> * libc/string/wcscpy.c: Remove stray ',' from prototype in ANSI_SYNOPSIS. * libc/string/wcpcpy.c: Ditto. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
* Fix some mangled makedoc markupJon TURNEY2015-06-233-5/+10
| | | | | | | | | 2015-06-23 Jon Turney <jon.turney@dronecode.org.uk> * libc/stdlib/itoa.c: Fix makedoc markup. * libc/stdlib/wcsnrtombs.c: Ditto. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
* Fix makedoc markup used in texinfo sourceJon TURNEY2015-06-233-2/+7
| | | | | | | | | 2015-06-23 Jon Turney <jon.turney@dronecode.org.uk> * libc/signal/signal.tex: Use texinfo not makedoc markup. * libc/stdio/stdio.tex: Ditto. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
* winsup/doc: Update ancient README about building documentationJon TURNEY2015-06-232-21/+6
| | | | | | | | | | | | | Update list of pre-requisites, everything else is obsolete. Future work: Ensure that the list of pre-requisites in FAQ 6.21 "How do I build Cygwin" remains synchronized with this list. 2015-06-22 Jon Turney <jon.turney@dronecode.org.uk> * README: Update. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
* winsup/doc: Use xidepend to generate the source list for FAQ targets as wellJon TURNEY2015-06-232-4/+6
| | | | | | | | 2015-06-22 Jon Turney <jon.turney@dronecode.org.uk> * Makefile.in (FAQ_SOURCES): Remove and generate with xidepend. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
* winsup/doc: Remove 'Usage' prefix from synopsesJon TURNEY2015-06-232-44/+48
| | | | | | | | | | Remove redundant 'Usage' prefix from synopses. 2015-06-22 Jon Turney <jon.turney@dronecode.org.uk> * utils.xml: Remove 'Usage' prefix from synopses. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
* winsup/doc: Add intro man pages from cygwin-docJon TURNEY2015-06-233-1/+209
| | | | | | | | | | | | | | | | | | | | | | v2: intro.1 and cygwin.1 are identical. Make cygwin.1 a link to intro.1 Update dates in static man pages v3: Use doclifter to convert intro.[13] to DocBook XML Clean up markup and fix a couple of spelling mistakes. Build and install manpages from XML v4: Update to refer to GPLv3+, SUSv4 Simplify ulinks where anchor text is the same as the URL 2015-06-22 Jon Turney <jon.turney@dronecode.org.uk> * Makefile.in (intro2man.stamp): Add. * intro.xml: New file. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
* winsup/doc: Create info pages from cygwin documentationJon TURNEY2015-06-235-6/+53
| | | | | | | | | | | | | | | | | | | | | | | | | v2: Updated to use docbook2x-texi not docbook2texi, since source is now docbook XML. Tweak DocBook XML so info directory entry has a description. v3: Use a custom charmap to handle &reg; v4: Proper build avoidance texinfo node references may not contain ':', so provide alternate text for a few xref targets 2015-06-22 Jon Turney <jon.turney@dronecode.org.uk> * Makefile.in (install-info, cygwin-ug-net.info) (cygwin-api.info): Add. * cygwin-ug-net.xml: Add texinfo-node. * cygwin-api.xml: Ditto. * ntsec.xml (db_home): Add texinfo-node for titles containing a ':' which are the targets of an xref. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
* Complement SIGEV_* enums with macrosKen Brown2015-06-232-0/+8
| | | | | | * include/cygwin/signal.h (SIGEV_*): Add macros. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Don't push on original stack during alternate signal stack setupCorinna Vinschen2015-06-222-56/+56
| | | | | | | | | * exceptions.cc (_cygtls::call_signal_handler): Drop pushing a register on the original stack, it confuses GCC. Rearrange the assembler code so that $rax/$eax is not used by GCC to prepare an argument value. Use $rax/$eax without saving. Drop clearing $rbp/$epb. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* sys/signal.h requires sys/cdefs.hCorinna Vinschen2015-06-222-0/+5
| | | | | | * libc/include/sys/signal.h: Include forgotten sys/cdefs.h. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Safe all clobbered volatile registers when using alternate stackCorinna Vinschen2015-06-212-22/+54
| | | | | | | | | * exceptions.cc (_cygtls::call_signal_handler): Drop subtracting 16 bytes from the alternate stack, it's not necessary. Safe all clobbered registers. Safe one on the orignal stack, the others on the alternate stack on both platforms. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Fix commentsCorinna Vinschen2015-06-201-2/+2
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* ChangeLog entries for Cygwin's alternate signal stack implementationCorinna Vinschen2015-06-203-0/+41
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Add alternate signal stack to docsCorinna Vinschen2015-06-203-1/+17
| | | | | | | * new-features.xml (ov-new2.1): Add alterante signal stack info. * posix.xml (std-susv4): Move sigaltstack here. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Implement using alternate signal stack in CygwinCorinna Vinschen2015-06-201-13/+108
| | | | | | | * exceptions.cc (_cygtls::call_signal_handler): Implement alternate signal stack handling. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Use MINSIGSTKSZ and SIGSTKSZ from newlib for Cygwin as wellCorinna Vinschen2015-06-202-17/+14
| | | | | | | | | | * libc/include/sys/signal.h: Move altstack macros completely outside of rtems block. * include/cygwin/signal.h: Remove definitions of MINSIGSTKSZ and SIGSTKSZ here. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Handle exceptions in sigaltstackCorinna Vinschen2015-06-201-21/+35
| | | | | | * signal.cc (sigaltstack): Add fault handler. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Preliminary infrastructure to implement alternate stackCorinna Vinschen2015-06-199-153/+215
| | | | | | | | | | | | | | | | | | | | | | | * libc/include/sys/signal.h: Define SS_ONSTACK and SS_DISABLE unconditionally. (sigaltstack): Enable prototype on Cygwin. * common.din (sigaltstack): Export. * cygtls.cc (_cygtls::init_thread): Initialize altstack. * cygtls.h (__tlsstack_t): Rename from __stack_t to distinguish more clearly from stack_t. Accommodate throughout. (_cygtls): Add altstack member. * exceptions.cc (exception::handle): Set SIGSEGV handler to SIG_DFL if we encounter a stack overflow, and no alternate stack has been defined. * include/cygwin/signal.h (MINSIGSTKSZ): Define (SIGSTKSZ): Define. (SA_ONSTACK): Define. * signal.cc (sigaltstack): New function. * tlsoffset.h: Regenerate. * tlsoffset64.h: Ditto. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Formatting fixes in exceptions.ccCorinna Vinschen2015-06-192-37/+67
| | | | | | * Makefile.in (install-man): Exclude release subdir from search paths. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* winsup/doc: Fix command to create man3 install directoryJon TURNEY2015-06-192-1/+6
| | | | | | | | | | | | Fix a cut and paste error in the command to create the man3 install directory, added in 94f16969 2015-06-19 Jon Turney <jon.turney@dronecode.org.uk> * Makefile.in (install-man): Fix command to create man3 install directory. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
* Disallow installing "man pages" from release subdirCorinna Vinschen2015-06-182-4/+8
| | | | | | * Makefile.in (install-man): Exclude release subdir from search paths. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* winsup/doc: Add man.xsl customization stylesheetJon TURNEY2015-06-183-4/+22
| | | | | | | | | 2015-06-17 Jon Turney <jon.turney@dronecode.org.uk> * man.xsl: New file. * Makefile.in (utils2man.stamp, api2man.stamp): Use it. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
* winsup/doc: Make and install cygwin-api function manpagesJon TURNEY2015-06-182-2/+16
| | | | | | | | | | | | | | Use 'xmlto man' to make manpages for utils This will generate multiple .1 files as an output, but we don't know what they will be called, so use a timestamp for build avoidance 2015-06-17 Jon Turney <jon.turney@dronecode.org.uk> * Makefile.in (api2man.stamp): Add rules to build and install manpages for cygwin-api. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
* winsup/doc: Convert cygwin-api function documentation to refentry elementsJon TURNEY2015-06-185-68/+258
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert cygwin-api from using a sect2 element to using a refentry element for each function. This makes it possible to generate manpage-style output for those elements. Note that the chunked html now generates a page for each function, rather than one containing all functions. Also: Remove pointless and incorrect date Move introductory paragraph from the first section to the start of the chapter Add a funcsynopsisinfo element with the header file to be included to each function prototype Remove extern "C" which doesn't process into all formats successfully 2015-06-17 Jon Turney <jon.turney@dronecode.org.uk> * cygwin-api.xml: Move introductory paragraph here. * logon-funcs.xml: Convert from using a sect2 element to using a refentry element for each function. * misc-funcs.xml: Ditto. * path.xml: Ditto. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
* winsup/doc: Generate ANSI rather than K&R style function prototypesJon TURNEY2015-06-183-0/+12
| | | | | | | | | | | | | | Since K&R style prototypes appear to be the default for HTML and FO, customize the stylesheets rendering of funcsynopsis elements to generate ANSI style prototypes instead. 2015-06-17 Jon Turney <jon.turney@dronecode.org.uk> * fo.xsl: Render funcsynopsis elements as ANSI style function prototypes. * html.xsl: Ditto. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
* winsup/doc: Rename cygwin.xsl as html.xslJon TURNEY2015-06-183-8/+12
| | | | | | | | | | For clarity, rename cygwin.xsl as html.xsl, because that's what it is 2015-06-17 Jon Turney <jon.turney@dronecode.org.uk> * html.xsl: Renamed from cygwin.xsl. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
* Add sethostname to API listCorinna Vinschen2015-06-172-0/+5
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Add sethostnameCorinna Vinschen2015-06-177-3/+44
| | | | | | | | | | | | * net.cc (sethostname): New function. * common.din (sethostname): Export * include/cygwin/version.h (CYGWIN_VERSION_DLL_MAJOR): Bump to 2001. (CYGWIN_VERSION_DLL_MINOR): Set to 0. * new-features.xml (ov-new): Rename from ov-new1.7. (ov-new2.1): Add new section. Document sethostname. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Add release/2.0.5 fileCorinna Vinschen2015-06-171-0/+16
|
* winsup/doc: Make and install manpages for utilsJon TURNEY2015-06-162-3/+20
| | | | | | | | | | | | | | | | Use 'xmlto man' to make manpages for utils (docbook2x-man could also be used, but since we already use xmlto...) This will generate multiple .1 files as an output, but we don't know what they will be called, so use a timestamp file for build avoidance when the dependencies haven't changed. 2015-06-12 Jon Turney <jon.turney@dronecode.org.uk> * Makefile.in (install-man, utils2man.stamp): Add rules to build and install manpages for utils. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
* winsup/doc: Convert utils.xml to using refentry elementsJon TURNEY2015-06-164-209/+625
| | | | | | | | | | | | | | | | | | | | | | | | Convert utils.xml from using a sect2 element to using a refentry element for each utility program. This makes it possible to generate manpage-style output for those elements. Note that the chunked html now generates a page for each utility, rather than one containing all utilities. A small customization to TOC generation for HTML and PDF is needed to ensure that it appears as before, containing an entry for each utility command. Future work: synopsis and options sections could use more detailed markup than just wrapping the whole thing in <screen> 2015-06-12 Jon Turney <jon.turney@dronecode.org.uk> * utils.xml : Convert from using a sect2 element to using a refentry element for each utility program. * cygwin.xsl: Customize autotoc to include refentries. * fo.xsl: Ditto. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
* winsup/doc: Fix an issue with parallel makeJon TURNEY2015-06-162-0/+6
| | | | | | | | | | | | | | The cygwin-ug-net-nochunks.html.gz target does not ensure that the cygwin-ug-net/ directory exists, so it can fail if run on it's own, or if the cygwin-ug-net/cygwin-ug-net.html target has not yet created it in a parallel make. 2015-06-12 Jon Turney <jon.turney@dronecode.org.uk> * Makefile.in (cygwin-ug-net/cygwin-ug-net-nochunks.html.gz): Ensure cygwin-ug-net directory exists. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>