Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-11-07 * dcrt0.cc (cygwin__cxa_atexit): Fetch correct DSO handle valueCorinna Vinschen
by searching dll list. Explain why.
2014-11-06 * dcrt0.cc (cygwin_atexit): Change preceeding comment to reflectCorinna Vinschen
API version numbers. * external.cc (cygwin_internal): disable setting cxx_malloc on 64 bit. Add CW_FIXED_ATEXIT case. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump. * include/sys/cygwin.h (cygwin_getinfo_types): Add CW_FIXED_ATEXIT. * lib/atexit.c (atexit): Test running Cygwin version by checking return value of cygwin_internal (CW_FIXED_ATEXIT).
2014-11-05 * Makefile.in (NEW_FUNCTIONS): Add atexit to be not exported.Corinna Vinschen
* lib/atexit.c (atexit): New, statically linkable version of atexit. * dcrt0.cc (cygwin_atexit): Add comment to mark this function as old entry point. Indiscriminately check for DSO of function pointer for all functions, if checking for DSO of return address fails on x86_64. Change comment accordingly.
2014-10-29 * common.din (__cxa_atexit): Define as cygwin__cxa_atexit.Corinna Vinschen
* dcrt0.cc (cygwin__cxa_atexit): New function. Explain what we do.
2014-10-28 * dcrt0.cc (cygwin_atexit): Add workaround for broken atexit callsCorinna Vinschen
in __gcc_register_frame of DLLs built with gcc-4.8.3-3.
2014-10-17 * cygheap.cc (cygheap_fixup_in_child): Call set_dll_dir.Corinna Vinschen
(init_cygheap::init_installation_root): Just memmove contents of installation_root instead of calling GetModuleFileNameW again. Copy installation_root to installation_dir before stripping of "bin" dir. Don't call SetDllDirectory here. Explain what we do. (setup_cygheap): New function taking over initial cygheap setup from memory_init. Additionally call set_dll_dir. * cygheap.h (struct init_cygheap): Add installation_dir member. (init_cygheap::set_dll_dir): Define. (setup_cygheap): Declare. * dcrt0.cc: Throughout drop parameter from memory_init call. (dll_crt0_0): Call setup_cygheap prior to memory_init. * dlfcn.cc (dlopen): Change comment to point to the right function. * shared.cc (memory_init): Drop parameter. Drop cygheap setup. * shared_info.h (memory_init): Change declaration accordingly.
2014-10-10 * dlfcn.cc (dlopen): Disable old 32 bit code on 64 bit.Corinna Vinschen
* dcrt0.cc (check_sanity_and_sync): Ditto. * dll_init.cc (dll_dllcrt0_1): Fix typo in comment.
2014-08-22 * Throughout, use __try/__except/__endtry blocks, rather than myfaultCorinna Vinschen
handler. * cygtls.cc (_cygtls::remove): Accommodate the fact that pathbufs has been moved from _local_storage to _cygtls. * cygtls.h (class tls_pathbuf): Add comment to hint to gendef usage of counters. Change type of counters to uint32_t for clarity. Remove _cygtls as friend class. (struct _local_storage): Move pathbufs from here... (struct _cygtls): ...to here, allowing to access it from _sigbe. (class san): Only define on 32 bit. Remove errno, _c_cnt and _w_cnt members. (san::setup): Drop parameter. Don't initialize removed members. (san::leave): Don't set removed members. (class myfault): Only define on 32 bit. (myfault::faulted): Only keep implementation not taking any parameter. Drop argument in call to sebastian.setup. (__try/__leave/__except/__endtry): Implement to support real SEH. For now stick to SJLJ on 32 bit. * dcrt0.cc (dll_crt0_0): Drop 64 bit call to exception::install_myfault_handler. * exception.h (exception_handler): Define with EXCEPTION_DISPOSITION as return type. (PDISPATCHER_CONTEXT): Define as void * on 32 bit. Define as pointer to _DISPATCHER_CONTEXT on 64 bit. (class exception): Define separately for 32 and 64 bit. (exception::myfault): Add handler for myfault SEH handling on 64 bit. (exception::exception): Fix mangled method name to account for change in type of last parameter. (exception::install_myfault_handler): Remove. * exceptions.cc (exception::myfault_handle): Remove. (exception::myfault): New SEH handler for 64 bit. * gendef (_sigbe): Set tls_pathbuf counters to 0 explicitely when returning to the caller. * ntdll.h: Move a comment to a better place. (struct _SCOPE_TABLE): Define on 64 bit. * thread.cc (verifyable_object_isvalid): Remove gcc 4.7 workaround. * tls_pbuf.cc (tls_pbuf): Fix to accommodate new place of pathbufs. (tls_pathbuf::destroy): Change type of loop variables to uint32_t. * tls_pbuf.h (class tmp_pathbuf): Change type of buffer counters to uint32_t. Accommodate new place of pathbufs. * tlsoffsets.h: Regenerate. * tlsoffsets64.h: Regenerate.
2014-08-19 * autoload.cc: Replace WNet[...]A with WNet[...]W imports.Corinna Vinschen
* dcrt0.cc (initial_env): Drop strlwr calls. Call strcasestr instead. * fhandler_netdrive.cc: Throughout, convert to calling WNet UNICODE functions. Use tmp_pathbuf rather than alloca. Replace call to strlwr with call to RtlDowncaseUnicodeString.
2014-08-07* common.din (__cxa_finalize): Export.Yaakov Selkowitz
* dcrt0.cc (cygwin_atexit): Use d->handle with __cxa_atexit. * dll_init.cc (dll_list::detach): Use d->handle with __cxa_finalize. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Use 274 for __cxa_finalize as well.
2014-06-23 * dcrt0.cc (insert_file): Fix resource leaks (CIDs 59987, 59988).Corinna Vinschen
2014-03-29 * dcrt0.cc (dll_crt0_0): Install myfault exception handler on x86_64.Corinna Vinschen
* 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-02-16 * dcrt0.cc (dll_crt0_1): Call initial_setlocale before fetchingCorinna Vinschen
current user information.
2014-02-10 * dcrt0.cc (child_info_spawn::handle_spawn): Call fixup_lockf_after_execCorinna Vinschen
with additional argument to specify if the process has been execed or spawned. * flock.cc (fixup_lockf_after_exec): Take bool parameter to handle exec and spawn differently. In case of spawn, just give up POSIX locks in favor of the still running parent. Add comments to explain.
2013-12-18* dcrt0.cc (dll_crt0_1): Remove NtSetTimerResolution.Christopher Faylor
* pinfo.cc (pinfo::init): Increase wait interval when waiting for procinfo to stabilize.
2013-12-18* autoload.cc (timeBeginPeriod): Delete.Christopher Faylor
* dcrt0.cc (dll_crt0_1): Use NtSetTimerResolution rather than timeBeginPeriod.
2013-12-18* autoload.cc (timeBeginPeriod): Autoload.Christopher Faylor
* dcrt0.cc (dll_crt0_1): Use timeBeginPeriod to set default resolution to 1 ms. * pinfo.cc (pinfo::thisproc): Set ppid for redirected _pinfo blocks too. (pinfo::init): Avoid using VirtualQuery. Just rely on the assumption that procinfo will be populated. * pinfo.h (_pinfo::ppid): Move into redirected block.
2013-07-17* winsup.h (cygbench): Fix declaration to match definition.Christopher Faylor
* dcrt0.cc (initial_env): Remove unused variable.
2013-06-27 * dcrt0.cc (child_info_fork::alloc_stack): Fix a comparison to avoidCorinna Vinschen
taking 4K more stack in forked child. * fork.cc (frok::parent): Print child exit code in hex if sync failed.
2013-06-19* dcrt0.cc (child_info_fork::alloc_stack): Don't subtract 4096 from stackChristopher Faylor
pointer since getstack() already does that.
2013-05-24 * dcrt0.cc (child_info_fork::alloc_stack_hard_way): Fix datatype ofCorinna Vinschen
stacksize to SIZE_T. Cast to SIZE_T in pointer arithmetic. Slightly enhance output in case of a fatal error. * fork.cc (frok::parent): Always set ch.stackaddr to DeallocationStack value of current thread to help stack reservation in child_info_fork::alloc_stack_hard_way along. Simplify subsequent code storing stack values in ch. Print guardsize in hex, too.
2013-04-23 * Merge in cygwin-64bit-branch.Corinna Vinschen
2013-04-08* cygheap.cc (init_cygheap::find_tls): Add a comment.Christopher Faylor
* dcrt0.cc (parent_sigmask): Delete. (dll_crt0_1): Use spawn_info->moreinfo->sigmask rather than saved parent signal mask. * thread.cc (pthread::thread_init_wrapper): Add comment stressing the importance of maintaining ordering of statements.
2013-03-31* child_info.h (cygheap_exec_info::sigmask): Declare new field.Christopher Faylor
* cygheap.cc (init_cygheap::find_tls): Rename threadlist_ix -> ix. Only take one pass through thread list, looking for eligible threads to signal. Set a new param indicating that function has found a sigwait* mask. * cygheap.h (init_cygheap::find_tls): Reflect new parameter. * dcrt0.cc (parent_sigmask): New variable. (child_info_spawn::handle_spawn): Save parent's signal mask here. (dll_crt0_1): Restore parent's signal mask to tls sigmask as appropriate. Call sig_dispatch_pending to flush signal queue when we can finally do something with signals. * exceptions.cc (sigpacket::process): Avoid attempting to handle signals if we haven't finished initializing. Rely on the fact that find_tls will do mask checking and don't do it again. Delete ill-named 'dummy' variable. * sigproc.cc (cygheap_exec_info::alloc): Save calling thread's signal mask in new sigmask field. (wait_sig): Try to debug when WFSO fails and DEBUGGING is defined. * thread.cc (pthread::set_tls_self_pointer): Make this a true automatic method rather than inexplicably relying on a thread parameter. (pthread::thread_init_wrapper): Accommodate set_tls_self_pointer change to non-static. Initialize sigmask before setting tid or suffer signal races. * ehread.h (pthread::set_tls_self_pointer): Make non-static, delete parameter.
2013-01-21* dcrt0.cc (dll_crt0_1): Comment assumption.Christopher Faylor
* exceptions.cc (sigpacket::setup_handler): Avoid sending signals during fork processing.
2013-01-21* dcrt0.cc (dll_crt0_1): Flag that we are working "incyg". Handle any signalsChristopher Faylor
(presumably exiting signals) which may have come in while we are in the process of setting up.
2013-01-09 * dcrt0.cc (main_thread_sinit): New inline function. Fix and explainCorinna Vinschen
a stdio initialization issue. (dll_crt0_1): Call main_thread_sinit rather than __sinit.
2012-12-28* DevNotes: Add entry cgf-000019.Christopher Faylor
* dcrt0.cc (do_exit): Just set exit_state to ES_EVENTS_TERMINATE and nuke call to events_terminate which just set a superfluous flag. * sigproc.cc (signal_exit_code): New variable. (setup_signal_exit): Define new function. (_cygtls::signal_exit): Remove accommodations for closing the signal pipe handle. (exit_thread): Just sleep if we're exiting. (wait_sig): If signal_exit_code is set, just handle bookkeeping signals and exit ReadFile loop if there is nothing more to process. Call signal_exit at end if signal_exit_code is non-zero. * sigproc.h (setup_signal_exit): Declare new function. * exceptions.cc (sigpacket::process): Use setup_signal_exit to control exiting due to a signal. (exception::handle): Ditto. Query exit_state rather than defunct exit_already to determine if we are exiting. * globals.cc (ES_SIGNAL_EXIT): New enum. * sync.h (lock_process::release): New function for explicitly unlocking muto. (lock_process::~lock_process): Use release method.
2012-12-20 * dcrt0.cc (build_argv): Allow quoted filenames in @ expression.Corinna Vinschen
2012-11-30revert erroneous checkinChristopher Faylor
2012-11-30* spawn.cc (child_info_spawn::worker): Make detection of '/c' case insensitiveChristopher Faylor
when looking for cmd.exe command line.
2012-10-27 * dcrt0.cc (quoted): Renamed strechr to strchrnul.Kai Tietz
* environ.cc (environ_init): Likewise. * sec_acl.cc (aclfromtext32): Likewise. * sec_auth.cc (extract_nt_dom_user): Likewise. * uinfo.cc (pwdgrp::next_str): Likewise. * string.h (strechr): Likewise.
2012-08-09* DevNotes: Add entry cgf-000014.Christopher Faylor
* cygheap.cc (tls_sentry): Move here, rename from 'sentry' in cygtls.cc (tls_sentry::lock): Ditto. (nthreads): Move from cygtls.cc (THREADLIST_CHUNK): Ditto. (cygheap_init): Call init_tls_list(). (init_cygheap::init_tls_list): Define new function. (init_cygheap::add_tls): Ditto. (init_cygheap::remove_tls): Ditto. (init_cygheap::find_tls): Ditto. Semi-resurrect from _cygtls::find_tls. * cygheap.h (init_cygheap::init_tls_list): Declare new function. (init_cygheap::add_tls): Ditto. (init_cygheap::remove_tls): Ditto. (init_cygheap::find_tls): Ditto. * cygtls.cc (sentry): Delete. (sentry::lock): Ditto. (nthreads): Ditto. (THREADLIST_CHUNK): Ditto. (_cygtls::init): Delete definition. (_cygtls::init_thread): Call cygheap->add_tls() to add thread to global list. (_cygtls::remove): cygheap->remove_tls() to remove thread from global list. * cygtls.h (_cygtls::init): Delete declaration. * dcrt0.cc (dll_crt0_0): Delete call to _cygtls::init(). * exceptions.cc (sigpacket::process): When no thread is specified, try to find one via cygheap->find_tls.
2012-07-29* fhandler_termios.cc (fhandler_termios::line_edit): Use special case '%0c'Christopher Faylor
handling to print non-printable characters using hex notation. * smallprint.cc (__small_vsprintf): Semi-reimplement printing of non-printable characters in hex but only when padding is specified. * dcrt0.cc (dll_crt0_0): Remove tty_list initialization. * shared.cc (memory_init): Initialize tty_list here. * path.cc (path_conv::check): Remove unneeded parentheses from if check.
2012-07-22* DevNotes: Add entry cgf-000013.Christopher Faylor
* cygserver_ipc.h (ipc_set_proc_info): Use _cygtls::ipc_set_proc_info to set per-thread signal arrived value. * cygthread.cc (cygthread::detach): Use per-thread signal_arrived via set_thread_waiting. * fork.cc (_cygtls::fixup_after_fork): Clear signal_arrived. (_cygtls::remove): Close any signal_arrived handle when thread exists. (_cygtls::find_tls): Remove unneeded function. * cygtls.h: Update copyright. (class _cygtls): Reorganize to help avoid rebuilding newlib when structure changes. (_cygtls::event): Delete. (_cygtls::threadkill): Ditto. (_cygtls::signal_waiting): Declare new bool. (_cygtls::find_tls): Delete declaration. (_cygtls::set_threadkill): Ditto. (_cygtls::reset_threadkill): Ditto. (_cygtls::set_signal_arrived): Declare new function. (class set_thread_waiting): Declare new class. * cygwait.cc (cw_nowait_storage): Define. (cygwait): Set per-thread signal_arrived via set_thread_waiting. Don't special-case _main_tls. * cygwait.h (cw_nowait): Define. (cw_infinite): Ditto. (cygwait): Redefine pathological wait-only case. * dcrt0.cc (dll_crt0_0): Remove call to now-defunct events_init(). (dll_crt0_1): Remove call to now-defunct create_signal_arrived(). * exceptions.cc: Reflect set_signal_mask() argument reordering throughout. Remove signal mask synchronization throughout. (events_init): Delete definition. (mask_sync): Delete now-unneeded mask synchronization. (set_signal_mask): Reverse order of arguments to "standard" to, from layout. Rename "newmask" argument to "setmask". Remove debugging. (sig_handle_tty_stop): Use cancelable_wait rather than WFMO. (_cygtls::interrupt_setup): Don't treat "threadkill" events specially. Conditionally set signal_arrived depending on whether the thread has created it or not. (sigpacket::process): Reorganize to reflect thread-specific sending of signals which is more in line with the way it was actually supposed to work. * fhandler_socket.cc (get_inet_addr): Use cancelable_wait rather than IsEventSignalled to avoid potential race. (fhandler_socket::wait_for_events): Set signal_arrived event using set_thread_waiting(). (fhandler_socket::close): Use cygwait for the case of just waiting 10 ms for a signal. * fhandler_tape.cc (fhandler_dev_tape::_lock): Use cancelable_wait rather than WFMO. Redo switch/case tests accordingly. * fhandler_termios.cc (fhandler_termios::bg_check): Use cygwait for case of just waiting 0 ms for a potential signal. * fhandler_tty.cc (fhandler_pty_master::process_slave_output): Use cancelable_wait rather than WFSO. * fhandler_windows.cc (fhandler_windows::read): Set per-thread signal_arrived via set_thread_waiting(). * flock.cc (lf_setlock): Ditto. * select.cc (pselect): Ditto. Set per-thread signal_arrived using set_thread_waiting(). * gendef: Don't special case handling of _cygtls::sig for threads. * gentls_offsets: Use #pragma once in tlsoffsets.h. * ntdll.h: Use #pragma once. * poll.cc: Reflect set_signal_mask() argument reordering. * posix_ipc.cc (ipc_mutex_lock): Use cancelable_wait rather than WFMO. (ipc_cond_timedwait): Set perl-thread signal arrived using set_thread_waiting(). * security.h: Use #pragma once. * signal.cc (abort): Reflect set_signal_mask() argument reordering. (clock_nanosleep): Ditto. Change call to cancelable_wait to properly specify handling of cancel and interrupt. (sigwaitinfo): Remove handling of per-thread event in favor of per-thread signal_arrived. Use cancelable_wait rather than WFSO. * sigproc.cc (signal_arrived): Delete definition. (create_signal_arrived): Ditto. * sigproc.h (signal_arrived): Delete declaration. (set_signal_mask): Avoid defining as a "C" function. Don't conditionally declare. (create_signal_arrived): Delete declaration. * syscalls.cc (rename): Use cygwait() rather than WFSO. * thread.h (fast_mutex::lock): Use cw_infinite rather than LARGE_NULL. * wait.cc (wait4): Ditto. * thread.cc (pthread_mutex::lock): Ditto. (pthread::join): Ditto. (semaphore::_wait): Ditto. (pthread_kill): Remove set_threadkill() accommodation. * tlsoffsets.h: Regenerate.
2012-07-04* dcrt0.cc (build_argv): Guard against NULL pointer dereference found by Clang.Christopher Faylor
2012-06-19Revert errneous checkin.Christopher Faylor
Check in actual change associated with ChangeLog.
2012-06-19* cygwait.cc (cancelable_wait): Mimic old cygwait behavior more closely wrtChristopher Faylor
handling of call_signal_handler. * cygwait.h (WAIT_CANCELED): Move here and redefine. (WAIT_SIGNALED): Ditto. * thread.h (WAIT_CANCELED): Delete. (WAIT_SIGNALED): Ditto.
2012-05-15* DevNotes: Add entry cgf-000007.Christopher Faylor
* child_info.h (child_info_spawn::parent_winpid): Declare new field. (child_info_spawn::get_parent_handle): Declare new function. * dcrt0.cc (child_info_spawn::get_parent_handle): Define new function. (child_info_spawn::handle_spawn): Recreate parent handle if possible when dynamically loaded. Don't mess with parent handle if it's NULL. * spawn.cc (child_info_spawn::worker): Set parent_winpid appropriately.
2012-05-07* DevNotes: Add entry cgf-000003.Christopher Faylor
* cygheap.h (init_cygheap::pid_handle): Delete. * dcrt0.cc (child_info_spawn::handle_spawn): Keep parent open if we have execed. * pinfo.cc (pinfo::thisproc): Remove pid_handle manipulations. (pinfo::init): Don't consider a reaped process to be available. * spawn.cc (child_info_spawn::worker): Remove pid_handle manipulations. Make wr_proc_pipe and parent noninheritable when starting a program which doesn't use the Cygwin DLL. Conditionally reset wr_proc_pipe to inheritable if CreateProcess fails. Inject wr_proc_pipe handle into non-Cygwin process. Consider a non-cygwin process to be 'synced'.
2012-03-21* dtable.cc (set_std_handle): Call SetStdHandle with NULL if fd is closed.Christopher Faylor
(dtable::release): "Close" standard handle if appropriate. * dcrt0.cc (dll_crt0_0): Fix minor switch formatting problem. * fork.cc (frok::parent): Make minor comment indentation change.
2012-03-20* child_info.h (CURR_CHILD_INFO_MAGIC): Reset.Christopher Faylor
(child_info::rd_proc_pipe): Declare new field. (child_info::wr_proc_pipe): Ditto. (child_info::prefork): Declare new function, derived from previous pinfo version. * dcrt0.cc (child_info_fork::handle_fork): Close previous wr_proc_pipe when appropriate and assign new one from passed-in child_info block. (child_info_spawn::handle_spawn): Assign our wr_proc_pipe handle from passed-in child_info block. * fork.cc (child_info::prefork): Define new function. (frok::child): Clear rd_proc_pipe and wr_proc_pipe so they will not be closed by the child_info destructor. (frok::parent): Use child_info prefork handling, outside of retry loop. Set rd_proc_pipe in child's pinfo after successful CreateProcess. Eliminate postfork call. * globals.cc (my_wr_proc_pipe): Define/declare new variable. * pinfo.cc (pinfo::pending_rd_proc_pipe): Delete. (pinfo::pending_wr_proc_pipe): Ditto. (pinfo::prefork): Ditto. (pinfo::postfork): Ditto. (pinfo::postexec): Ditto. (pinfo::wait): Assume that rd_proc_pipe is set up correctly prior to call. (_pinfo::alert_parent): Replace "wr_proc_pipe" with "my_wr_proc_pipe". * pinfo.h (_pinfo::_wr_proc_pipe): Delete declaration. (_pinfo::set_rd_proc_pipe): Define new function. (pinfo::pending_rd_proc_pipe): Delete declaration. (pinfo::pending_wr_proc_pipe): Ditto. (pinfo::prefork): Ditto. (pinfo::postfork): Ditto. (pinfo::postexec): Ditto. (pinfo::wr_proc_pipe): Ditto. * sigproc.cc (child_info::child_info): Clear rd_proc_pipe and wr_proc_pipe. (child_info::cleanup): Close rd_proc_pipe and wr_proc_pipe if necessary. (child_info_fork::child_info_fork): Set forker_finished to NULL by default. (child_info_spawn::child_info_spawn): Use my_wr_proc_pipe rather than myself->wr_proc_pipe. (child_info::sync): Ditto. (child_info_spawn::cleanup): Call child_info::cleanup. * spawn.cc (child_info_spawn::worker): Remove call to myself.prefork(). Set wr_proc_pipe when execing or set up new rd_proc_pipe/wr_proc_pipe via child_info::prefork when spawning. Remove call to pinfo::postexec. Set rd_proc_pipe in child pinfo when spawning. Use my_wr_proc_pipe rather than myself->wr_proc_pipe. Remove call to postfork.
2012-03-05 * init.cc (dll_entry): Move wincap.init call back from here...Corinna Vinschen
* dcrt0.cc (dll_crt0_0): ...to here.
2012-01-27 * dcrt0.cc (is_dos_path): New macro to recognize drive letter and UNCCorinna Vinschen
DOS paths. (globify): Call is_dos_path instead of isdrive.
2011-12-21 * dcrt0.cc (_dll_crt0): Rephrase comments. Set $ebp to NULL, as inCorinna Vinschen
the pthread stack setup. * wow64.cc (wow64_revert_to_original_stack): Rephrase some comments. Return _tlsbase-16 rather than _main_tls-4 so as not to waste stack.
2011-12-19 * dcrt0.cc (dll_crt0_0): Check for wincap.wow64_has_secondary_stackCorinna Vinschen
rather than for wincap.is_wow64. Accommodate name change from wow64_has_64bit_parent to wow64_needs_stack_adjustment. Align comment. (_dll_crt0): Ditto. * wincap.h (wincaps::wow64_has_secondary_stack): New element. * wincap.cc: Implement above element throughout. (wincapc::init): Set wow64_has_secondary_stack to false on non-64 bit systems. * wow64.cc (wow64_needs_stack_adjustment): Rename (hopefully the last time) from wow64_has_64bit_parent. (wow64_eval_expected_main_stack): Fix comment to reflect real life. (wow64_test_for_64bit_parent): Fix comment. * wow64.h (wow64_needs_stack_adjustment): Accommodate new name.
2011-12-18Clean up whitespace.Christopher Faylor
2011-12-17 * dcrt0.cc (_dll_crt0): Fix formatting.Corinna Vinschen
2011-12-16 * dcrt0.cc (child_info_fork::alloc_stack): Correctly check if theCorinna Vinschen
parent stack fits into the child stack. Align comment. * wow64.cc (wow64_eval_expected_main_stack): New function to fetch expected addresses of main thread stack from PE/COFF image header values. (wow64_test_for_64bit_parent): Fix comment. Check current stack against real expected main thread stack addresses. (wow64_revert_to_original_stack): Fix and add comments. Check memory against real expected main thread stack addresses. Use orignal stack if reserved area is >= 256K.
2011-12-16 * Makefile.in (DLL_OFILES): Add wow64.o.Corinna Vinschen
* dcrt0.cc (CYGWIN_GUARD): Drop execute permission for stack, it's not used for stacks by the OS either. (child_info_fork::alloc_stack_hard_way): Ditto. (child_info_fork::alloc_stack): Don't alloc_stack_hard_way under WOW64 if forked from a 64 bit parent. Set child's StackBase to parent's StackBase. Add comments to explain why. (wow64_respawn): Move to wow64.cc. (wow64_started_from_native64): Move to wow64.cc. (respawn_wow64_process): Move to wow64.cc. (dll_crt0_0): Drop wow64_test_stack_marker and move stack test into wow64_test_for_64bit_parent function. Don't return early if WOW64 process has been started from native 64 bit process. (_dll_crt0): Implement moving stack for WOW64 processes started from native 64 bit process. * wow64.cc: New file. (wow64_has_64bit_parent): Rename from wow64_respawn. (wow64_test_for_64bit_parent): Rename from wow64_started_from_native64. Change comment. (wow64_revert_to_original_stack): New function. (wow64_respawn_process): Rename from respawn_wow64_process for symmetry. * wow64.h: New file.