* thread.cc (pthread::create): Handle stackaddr as upper bound address.
Add comment.
(pthread_attr_setstack): Store upper bound address in stackaddr.
Explain why.
(pthread_attr_getstack): Handle stackaddr as upper bound address.
Add comment.
(pthread_attr_setstackaddr): Add comment.
(pthread_attr_getstackaddr): Add comment.
(pthread_attr_getstacksize): Return default stacksize if stacksize has
not been set by the application, just as on Linux. Add comment.
(pthread_getattr_np): Store upper bound address in stackaddr. Explain
why.
* include/pthread.h: Remove outdated comment.
(pthread_attr_getstackaddr): Mark as deprecated, as on Linux.
(pthread_attr_setstackaddr): Ditto.
2014-07-15 Christopher Faylor <me.cygwin2014@cgf.cx>
* sigproc.cc (sigproc_init): Set aside more buffer space for signal
pipes.
(sig_send): Retry WriteFiles which fail when there is no error but
packbytes have not been sent.
* 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.
* 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).
* 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().
* 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.
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.
* 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.
* 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.
* 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.