Commit Graph

15570 Commits

Author SHA1 Message Date
Corinna Vinschen 360ef6666b 2014-05-19 Corinna Vinschen <corinna@vinschen.de>
* bsd_mutex.cc (msleep_sync_array::~msleep_sync_array): New destructor
	to make Coverity happy (CID 59838).

2014-05-19  Corinna Vinschen  <corinna@vinschen.de>

	* bsd_helper.cc (ipcexit_creat_hookthread): Delete shs to make
	Coverity happy (CID 59993).
	* transport_pipes.cc (transport_layer_pipes::listen): Make listen_pipe
	and connect_pipe statics to make Coverity happy (CID 60010/60011).

2014-04-16  Corinna Vinschen  <corinna@vinschen.de>

	* cygserver-config: Use numeric id 18 instead of "system" in chown.
2014-07-16 08:30:48 +00:00
Corinna Vinschen 92f2522b66 Pull in forgotten native symlink patch 2014-07-16 08:01:00 +00:00
Corinna Vinschen 2d1c36beaf * sigproc.cc (send_sig): Don't report an error if WriteFile succeeds. 2014-07-15 15:48:45 +00:00
Corinna Vinschen 1b9531007b * bsd_helper.cc (ipcexit_creat_hookthread): Delete shs in another error
case to make Coverity really happy (CID 59993).
2014-07-15 14:35:00 +00:00
Corinna Vinschen 55d6904204 2014-07-14 Christopher Faylor <me.cygwin2014@cgf.cx>
* sigproc.cc (send_sig): Fix bad format in diagnostic output.

2014-07-14  Yaakov Selkowitz  <yselkowitz@cygwin.com>

	* thread.cc (pthread_mutex::pthread_mutex): Change default type
	to PTHREAD_MUTEX_NORMAL.
	(pthread_mutex::unlock): Return EPERM if the mutex has no owner and
	the mutex type is PTHREAD_MUTEX_ERRORCHECK, as on Linux.
	(pthread_mutexattr::pthread_mutexattr): Ditto.
	(pthread_mutex_unlock): Do not fail if mutex is a normal mutex
	initializer.
	* include/pthread.h (PTHREAD_MUTEX_INITIALIZER): Redefine as
	PTHREAD_NORMAL_MUTEX_INITIALIZER_NP.

2014-07-09  Corinna Vinschen  <corinna@vinschen.de>

	* thread.cc (pthread::create): Use PTHREAD_DEFAULT_STACKSIZE stacksize
	if attr.stacksize is 0.
	(pthread_attr::pthread_attr): Initialize stacksize to 0 to align more
	closely to Linux.
	(pthread_attr_getstack): Fix incorrect stackaddr computation.  Return
	stackaddr just like pthread_attr_getstackaddr.  Remove slightly off
	comment.
	(pthread_attr_getstackaddr): Remove slightly off comment.
	(pthread_getattr_np): Return stackaddr and stacksize based on the full
	allocated stackarea.

2014-07-09  Corinna Vinschen  <corinna@vinschen.de>

	* exceptions.cc (exception::myfault_handle): Rephrase comment.

2014-07-09  Corinna Vinschen  <corinna@vinschen.de>

	* exceptions.cc (exception::myfault_handle): Fix typo in comment.

2014-07-07  Corinna Vinschen  <corinna@vinschen.de>

	* exceptions.cc (exception::myfault_handle): Disable handling
	STATUS_STACK_OVERFLOW.  Explain why.

2014-07-07  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_socket.cc (fhandler_socket::send_internal): Improve loop to
	write streams in chunks of wmem() bytes to raise performance when
	writing small buffers.  Rename variables and add comments to help
	understanding the code in years to come.

2014-07-07  Corinna Vinschen  <corinna@vinschen.de>

	* libc/minires.c (minires_dprintf): Change "Minires" to "Resolv" to
	differ from external minres lib.
	(res_nquerydomain): Fix off-by-one in domain concatenation.  Add debug
	output.

2014-06-23  Corinna Vinschen  <corinna@vinschen.de>

	* spawn.cc (find_exec): Initialize err (CID 60111).
	* strace.cc (strace::activate): Fix potential buffer overrun (CID 59938)
	* syscalls.cc (popen): Close parent pipe descriptor via fclosing fp on
	error to avoid resource leak (CID 59981).
	* thread.cc (pthread::exit): Avoid accessing cygtls member after
	deleting "this" (CID 60217).

2014-06-23  Corinna Vinschen  <corinna@vinschen.de>

	* select.cc (start_thread_socket): Delete si on early return in case of
	an error (CID 59967).

2014-06-23  Corinna Vinschen  <corinna@vinschen.de>

	* regex/regcomp.c (computematchjumps): Free local memory in case of
	error (CID 59975).

2014-06-23  Corinna Vinschen  <corinna@vinschen.de>

	* mount.cc (fs_info::update): Define dir in the outermost scope to avoid
	accessing out-of-scope value (CID 60027).  Always initialize attr to
	upath (CID 60113).

2014-06-23  Corinna Vinschen  <corinna@vinschen.de>

	* malloc_wrapper.cc (mallinfo): Initialize m if external malloc is used,
	too (CID 60120).

2014-06-23  Corinna Vinschen  <corinna@vinschen.de>

	* localtime.cc (tzload): Fix leaking memory (CID 60001).

2014-06-23  Corinna Vinschen  <corinna@vinschen.de>

	* environ.cc (regopt): Allocate small local buffer to avoid copying
	twice.  Fixes resource leak (CID 60012).  Add comment.

2014-06-23  Corinna Vinschen  <corinna@vinschen.de>

	* dll_init.cc (dll_list::alloc): Fix buffer overrun (CID 59940).

2014-06-23  Corinna Vinschen  <corinna@vinschen.de>

	* dcrt0.cc (insert_file): Fix resource leaks (CIDs 59987, 59988).
2014-07-15 14:34:39 +00:00
Corinna Vinschen 11b4ef2291 * legal.xml: Fix copyright. 2014-07-15 13:37:32 +00:00
Corinna Vinschen d610a4002a * net.cc (cygwin_getaddrinfo): Fix value of hint->ai_addrlen on 64 bit.
Explain why.
2014-06-23 12:35:39 +00:00
Corinna Vinschen 849019fa2e * client.cc: Throughout, fix debug output of signed byte count value. 2014-06-23 09:24:15 +00:00
Corinna Vinschen cf4b9e1c7e Fix timestamp 2014-06-17 13:13:12 +00:00
Corinna Vinschen 501ae846ce * libc/rexec.cc (cygwin_rexec): Make ahostbuf static to avoid returning
an out-of-scope address.
2014-06-17 09:13:53 +00:00
Corinna Vinschen a46f6d459f * passwd.c (main): Fix typo in error output. 2014-06-16 13:27:33 +00:00
Corinna Vinschen 5d427504a3 * fhandler_socket.cc (fhandler_socket::evaluate_events): Call
WSASetLastError after setsockopt.  Explain why.
2014-06-16 13:01:11 +00:00
Christopher Faylor a4893fb8b7 . 2014-05-22 17:20:26 +00:00
Corinna Vinschen 582858ff32 * gmon.h: Pull in profile.h. Explain why. 2014-05-22 16:04:37 +00:00
Corinna Vinschen e5ec51d44b * fhandler_floppy.cc (fhandler_dev_floppy::get_drive_info): Fix floppy
drive handling broken with 1.7.19.
2014-05-20 10:25:41 +00:00
Corinna Vinschen bfc7298aa2 * sec_auth.cc (cygwin_logon_user): Securely erase password copy.
(lsaprivkeyauth): Avoid trying to dereference data if no key is stored
	in the registry (CID 60122).  Securely erase passwords after usage.
2014-05-20 10:21:40 +00:00
Corinna Vinschen c718891f62 Bump copyright 2014-05-19 14:30:23 +00:00
Corinna Vinschen 966b317a2e * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 30. 2014-05-19 14:27:26 +00:00
Corinna Vinschen e22e910752 2014-04-21 Jon TURNEY <jon.turney@dronecode.org.uk>
* minidumper.cc (filter_minidump_type): New function.
	(minidump): Change default dump type from MiniDumpNormal to
	something with more useful information without getting too
	big. Use filter_minidump_type() to filter out unsupported dump
	types.

2014-04-21  Jon TURNEY  <jon.turney@dronecode.org.uk>

	* Makefile.in (minidumper.exe): Link directly with dbghelp.
	* minidumper.cc (minidump): Ditto.

2014-04-21  Jon TURNEY  <jon.turney@dronecode.org.uk>

	* minidumper.cc (minidump): Fix copy and paste error in checking
	result of OpenProcess().
2014-05-19 12:26:01 +00:00
Corinna Vinschen 7be802149c *** empty log message *** 2014-05-19 12:20:18 +00:00
Corinna Vinschen 25b0a14df4 Add accidentally missing patch from 2014-03-06 2014-05-19 12:02:45 +00:00
Corinna Vinschen 3ac6152ebb revert accidental checkin of removing "#include <pwdgrp.h>" 2014-05-19 11:49:16 +00:00
Corinna Vinschen 16fc8c3737 2014-05-19 Corinna Vinschen <corinna@vinschen.de>
* exceptions.cc (try_to_debug): Fix size of dbg_cmd (CID 59929).

2014-05-18  David Stacey  <drstacey@tiscali.co.uk>

	* syscalls.cc (getusershell): Fix buffer overrun (Coverity ID 59932).

2014-05-13  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_socket.cc (fhandler_socket::ioctl): Handle the different
	ideas of u_long between Winsock and Cygwin applications on x86_64.
	Add long comment.

2014-05-09  Christopher Faylor  <me.cygwin2014@cgf.cx>

	* signal.cc (sigprocmask): Fix strace output to include "how".

	* fhandler_console.cc (dev_console::save_restore): Only save current
	dwEnd line rather than the one after that.

2014-05-05  Corinna Vinschen  <corinna@vinschen.de>

	* net.cc (cygwin_getsockopt): Rearrange code slightly and handle
	TCP_NODELAY just like SO_KEEPALIVE and SO_DONTROUTE.

2014-05-03  Christopher Faylor  <me.cygwin2014@cgf.cx>

	* spawn.cc (av::setup): Eat trailing whitespace on #! script.

2014-05-02  Christopher Faylor  <me.cygwin2014@cgf.cx>

	* fhandler_dsp.cc (ioctl): Use _ioctl for recursive call.

2014-04-26  Christopher Faylor  <me.cygwin2014@cgf.cx>

	* DevNotes: Add entry cgf-000026.
	* fhandler.h (fhandler_console::save_top): Save top of screen
	coordinates.
	* fhandler_console.cc (dev::save_restore): Record top of screen
	coordinates.  Clear entire buffer when restoring saved buffer and try
	to position the cursor on the save relative place on the screen.

2014-04-25  Corinna Vinschen  <corinna@vinschen.de>

	* syscalls.cc (NT_TRANSACTIONAL_ERROR): Cover all status codes up to
	STATUS_TRANSACTION_NOT_ENLISTED.

2014-04-24  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_socket.cc: On x86_64, define u_long as __ms_u_long before
	including the windows headers.  Explain why.
	(get_inet_addr): Convert ANY address to LOOPBACK address.  Explain why.
	(fhandler_socket::evaluate_events): Forcibly set SO_ERROR socket option
	in case a connection attempt failed.  Explain why.
	(fhandler_socket::ioctl): Drop x86_64 re-definition of u_long here.
	* fhandler_procnet.cc: On x86_64, define u_long as __ms_u_long before
	including the windows headers.  Explain why.
	* net.cc: Ditto.

2014-04-23  Corinna Vinschen  <corinna@vinschen.de>

	* miscfuncs.cc (check_iovec): Allow 0 as valid iovcnt value.

2014-04-18  Corinna Vinschen  <corinna@vinschen.de>

	* winf.cc (linebuf::fromargv): Temporarily revert patch from 2014-01-24.

2014-04-16  Corinna Vinschen  <corinna@vinschen.de>

	* net.cc (cygwin_setsockopt): Ignore IPV6_TCLASS the same way as IP_TOS.

2014-04-08  Corinna Vinschen  <corinna@vinschen.de>

	* cygwin.sc.in: (Temporarily?) workaround serious ld bug which
	truncates symbols in certain computations to 32 bit.  See
	https://sourceware.org/bugzilla/show_bug.cgi?id=16821

2014-04-09  Corinna Vinschen  <corinna@vinschen.de>

	* exceptions.cc (exception::myfault_handle): Only handle the minimum
	amount of exceptions the myfault handler was designed for.
2014-05-19 11:47:54 +00:00
Corinna Vinschen cc56899ace release/1.7.29 2014-04-07 11:41:51 +00:00
Corinna Vinschen 4f4524e2ab * cygserver_ipc.h (ipc_set_proc_info): Add bool parameter to specify
whether or not to send signal_arrived.
	* shm.cc (client_request_shm::client_request_shm): Call
	ipc_set_proc_info with bool parameter set to true to not send
	signal_arrived.
2014-04-07 11:26:16 +00:00
Corinna Vinschen b9c45b82c8 * process.cc (process::process): Only notice that signal_arrived is
NULL in debug output.
2014-04-07 11:20:08 +00:00
Corinna Vinschen 13d6fb3bdb * Throughout, fix format specifiers in debug statements to accommodate
x86_64.

	* setpwd.cc (client_request_setpwd::serve): Use RtlSecureZeroMemory to
	delete password from memory.
2014-04-07 11:12:59 +00:00
Corinna Vinschen 5765295afe Forced checkin 2014-04-04 16:45:34 +00:00
Corinna Vinschen fc093e4966 * new-features.xml: (ov-new1.7.29): Fix incomplete XML tagging. 2014-04-04 16:17:23 +00:00
Corinna Vinschen 3246bde6fd *** empty log message *** 2014-04-04 14:32:59 +00:00
Corinna Vinschen 49cec39ce7 * ntea.cc (EA_BUFSIZ): Fix comment.
(read_ea): Use tmp_pathbuf for local buffer rather than alloca.
	Throughout change ZwQueryEaFile to NtQueryEaFile in comments.
2014-04-04 14:27:32 +00:00
Corinna Vinschen d35f4fae56 * ntea (EA_BUFSIZ): Reduce to 64K. Add comment to explain why. 2014-04-04 13:39:58 +00:00
Corinna Vinschen 6db8a48220 Pull into cygwin-1_7_29-release-branchpoint 2014-04-01 08:46:30 +00:00
Corinna Vinschen a32801f5f3 *** empty log message *** 2014-04-01 08:42:28 +00:00
Christopher Faylor 2bf3f48146 . 2014-03-31 23:45:08 +00:00
Christopher Faylor 015d4db294 * DevNotes: Add entry cgf-000025.
* exceptions.cc (_cygtls::signal_debugger): Reorganize to avoid contacting the
debugger if we have already done so via the exception handler.  Eliminate need
for goto.  Remove an ifdef in favor of just allocating a larger buffer.
2014-03-29 21:15:45 +00:00
Corinna Vinschen 5c8dc3eaab * dcrt0.cc (dll_crt0_0): Install myfault exception handler on x86_64.
* exception.h (exception_list): Typedef as void on x86_64.
	(exception::handler_installed): Remove.
	(exception::handle_while_being_debugged): Remove.
	(exception::myfault_handle): Declare for x86_64.
	(exception::handle): Declare as ordinary exception handler on x86_64
	as well.
	(exception::exception): Drop previous code (again).  Install
	exception::handle as SEH handler.
	(exception::install_myfault_handler): New x86_64-only method to
	install exception::myfault_handle as VEH handler.  Explain why.
	(exception::~exception): For x86_64, define frame end label (again).
	* exceptions.cc (CYG_EXC_CONTINUE_EXECUTION): Drop definition.
	(CYG_EXC_CONTINUE_SEARCH): Ditto.
	(exception::myfault_handle): New x86_64-only method, VEH handler to
	handle myfault exceptions.
	(exception::handle): Define as ordinary exception handler on x86_64
	as well.  Use ExceptionContinueExecution and ExceptionContinueSearch
	throughout instead of deleted Cygwin macros.  Don't handle myfault
	exceptions on x86_64.
2014-03-28 22:32:27 +00:00
Corinna Vinschen 5d3f8dbeb0 2014-03-28 Corinna Vinschen <corinna@vinschen.de>
* sec_auth.cc (create_token): Initialize lsa handle to NULL, rather than
	to INVALID_HANDLE_VALUE.
	(lsaauth): Ditto.
	(lsaprivkeyauth): Ditto.
	* setlsapwd.cc (setlsapwd): Don't initialize lsa handle.

2014-03-28  Corinna Vinschen  <corinna@vinschen.de>

	* exceptions.cc (_cygtls::signal_debugger): Move memcpy to copy context
	from incoming siginfo_t to thread_context, too.

2014-03-27  Corinna Vinschen  <corinna@vinschen.de>

	* gendef (_sigbe/x86_64): Fix typo in .seh_proc pseudo-op.
	(setjmp/x86_64): Drop storing ExceptionList pointer in jmp_buf->Frame.
	Drop comment.  Store likely frame in rdx.  Jump to __setjmpex.
	(__setjmpex): New function providing setjmp functionality.  Fetch
	jmp_buf->Frame from rdx, like MSVCRT setjmpex.
	(__sjfault/x86_64): Store rdx content in jmp_buf->Frame.
	(__ljfault/x86_64): Don't restore ExceptionList pointer.
	(longjmp/x86_64): Ditto.
2014-03-28 20:58:58 +00:00
Christopher Faylor 96cff0c274 * fhandler_dsp.cc (fhandler_dev_dsp::ioctl): Actually pass ioctl argument to
_ioctl.
2014-03-20 02:23:32 +00:00
Christopher Faylor a44aa06b18 * fhandler.h (fhandler_dev_dsp): Remove variable names from declarations.
(fhandler_dev_dsp::close_audio_in): Make __reg1.
(fhandler_dev_dsp::close_audio_out): Make __reg2.
* fhandler_dev_dsp.cc (fhandler_dev_dsp::close_audio_in): Make __reg1.
(fhandler_dev_dsp::close_audio_out): Make __reg2.
(fhandler_dev_dsp::close): Don't abruptly terminate sound just because we are
exiting.
2014-03-19 20:42:52 +00:00
Corinna Vinschen 3e92aaacfc * exception.h (exception::handle_while_being_debugged): Declare.
(exception::exception): Install unhandled exception filter.
	* exceptions.cc (exception::handle_while_being_debugged): New method.
2014-03-19 16:11:44 +00:00
Christopher Faylor 5b41bcc59c * fhandler_dsp.cc (fhandler_dev_dsp::fixup_after_fork): Actually call
_fixup_after_fork rather than looping forever.
(fhandler_dev_dsp::fixup_after_exec): Ditto.
2014-03-18 20:17:17 +00:00
Corinna Vinschen 5fd0dc293d Partially revert patch from 2014-03-04.
* exception.h (exception::handler_installed): Declare.
	(exception::exception): Install vectored exception handler on x86_64.
	(exception::~exception): Remove for x86_64.
	* exceptions.cc (exception::handler_installed): Define.
2014-03-18 13:51:30 +00:00
Christopher Faylor e86fa3ae83 * sigproc.h (no_thread_exit_protect): New class.
* sigproc.cc (thread_exit): Use no_thread_exit_protect to determine if we need
to coordinate ThreadExit/ExitProcess.
* fhandler_dsp.cc (fhandler_dev_dsp::Audio_out::stop): Use
no_thread_exit_protect to kludge around waiting for waveOutClose as it waits
for a thread that never exits.
(fhandler_dev_dsp::Audio_in::stop): Ditto for waveInClose.
2014-03-17 04:36:17 +00:00
Christopher Faylor 2e6ce0ebdc * fhandler.h (fhandler_dev_dsp::base): New method.
(fhandler_dev_dsp::_read): Ditto.
(fhandler_dev_dsp::_write): Ditto.
(fhandler_dev_dsp::_ioctl): Ditto.
(fhandler_dev_dsp::_fixup_after_fork): Ditto.
(fhandler_dev_dsp::_fixup_after_exec): Ditto.
* fhandler_dsp.cc (fhandler_dev_dsp::read): Call real function via base()
pointer.
(fhandler_dev_dsp::write): Ditto.
(fhandler_dev_dsp::ioctl): Ditto.
(fhandler_dev_dsp::fixup_after_fork): Ditto.
(fhandler_dev_dsp::fixup_after_exec): Ditto.
(fhandler_dev_dsp::_read): Rename by adding an leading underscore.
(fhandler_dev_dsp::_write): Ditto.
(fhandler_dev_dsp::_ioctl): Ditto.
(fhandler_dev_dsp::_fixup_after_fork): Ditto.
(fhandler_dev_dsp::_fixup_after_exec): Ditto.
2014-03-17 01:54:13 +00:00
Corinna Vinschen f8c68831c3 * include/cygwin/socket.h (IPV6_JOIN_GROUP): Revert.
(IPV6_LEAVE_GROUP): Ditto.
2014-03-13 09:14:46 +00:00
Christopher Faylor 516f5ee4f2 * fhandler.h (dev_console::b): Redefine as CONSOLE_SCREEN_BUFFER_INFO for use
with older OS.
* fhandler_console.cc (dev_console::fillin): Ditto for
GetConsoleScreenBufferInfo.
2014-03-10 18:18:49 +00:00
Christopher Faylor 7bdf8f2e1a * fhandler_console.cc (dev_console::save_restore): Save entire line of current
cursor position.
2014-03-10 17:33:06 +00:00
Christopher Faylor e558dbbeaf * fhandler_console.cc (fhandler_console::save_restore): Save only until last
written row and, because of this, don't bother trying to restore the screen
buffer size.  Set cursor position after refilling buffer.
(fhandler_console::write): Use absolute paths when saving/restoring cursor
position or suffer odd problems after a saved screen is restored.
2014-03-10 03:15:02 +00:00
Christopher Faylor 9fc8db8c60 Change wording 2014-03-09 22:50:04 +00:00