delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/07/25/13:47:32

X-Spam-Check-By: sourceware.org
From: "Dave Korn" <dave DOT korn AT artimi DOT com>
To: <cygwin AT cygwin DOT com>
Subject: strace -vs- cygload funny
Date: Tue, 25 Jul 2006 18:47:20 +0100
Message-ID: <007c01c6b012$6105d570$a501a8c0@CAM.ARTIMI.COM>
MIME-Version: 1.0
X-Mailer: Microsoft Office Outlook 11
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

  So, how come strace works properly?

  According to how-cygtls, 

"  If you load cygwin1.dll dynamically from a non-cygwin application, it is
  vital that the bottom CYGTLS_PADSIZE bytes of the stack are not in use
  before you call cygwin_dll_init().  See winsup/testsuite/cygload for 
  more information.  "

  What that doesn't make clear is whether calling cygwin_dll_init is
compulsory, or optional.  What strace.cc does is to LoadLibrary the cygwin
dll, without making any provision for padding on the stack.  But it never
calls cygwin_dll_init - at least, not explicitly.  It does, however, call
cygwin_internal for CW_CYGWIN_PID_TO_WINPID, CW_STRACE_TOGGLE, and CW_ARGV.

  Is this OK?

    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019