锘??xml version="1.0" encoding="utf-8" standalone="yes"?>欧美日韩在线播放一区,亚洲国产日韩精品,好吊一区二区三区http://m.shnenglu.com/jans2002/archive/2010/01/25/106363.htmljans2002jans2002Mon, 25 Jan 2010 01:27:00 GMThttp://m.shnenglu.com/jans2002/archive/2010/01/25/106363.htmlhttp://m.shnenglu.com/jans2002/comments/106363.htmlhttp://m.shnenglu.com/jans2002/archive/2010/01/25/106363.html#Feedback2http://m.shnenglu.com/jans2002/comments/commentRss/106363.htmlhttp://m.shnenglu.com/jans2002/services/trackbacks/106363.htmlCMake鍙風О鏄緢杞誨ぇ璺ㄥ鉤鍙扮殑緙栬瘧宸ュ叿錛屼簬鏄兂璇曠敤涓涓嬶紝娌℃兂鍒板叾Windows涓嬬殑瀹夎紼嬪簭濡傛寮辨櫤錛屾妸鎴戠殑鐜鍙橀噺閰嶇疆鐨凱ath璺緞鍏ㄧ粰鍐蹭簡錛岃繖鏍風殑鍨冨溇宸ュ叿榪樻槸灝戠敤涓哄銆傛棦鐒跺彿縐拌法騫沖彴錛岃繛Windows閮芥敮鎸佺殑榪欎箞宸紝涔熶笉鏀寔涓枃錛屾兂蹇呭叾浠栧鉤鍙扮殑涔熷ソ涓嶅埌閭i噷鍘匯傝繕鏄佽佸疄瀹炵殑鍐欐垜鐨凪akefile鍚с?/p>

jans2002 2010-01-25 09:27 鍙戣〃璇勮
]]>
(杞?鎬庝箞鑾峰彇dll鍑芥暟鐨勫弬鏁扮被鍨?/title><link>http://m.shnenglu.com/jans2002/archive/2009/10/14/98543.html</link><dc:creator>jans2002</dc:creator><author>jans2002</author><pubDate>Wed, 14 Oct 2009 00:37:00 GMT</pubDate><guid>http://m.shnenglu.com/jans2002/archive/2009/10/14/98543.html</guid><wfw:comment>http://m.shnenglu.com/jans2002/comments/98543.html</wfw:comment><comments>http://m.shnenglu.com/jans2002/archive/2009/10/14/98543.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.shnenglu.com/jans2002/comments/commentRss/98543.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/jans2002/services/trackbacks/98543.html</trackback:ping><description><![CDATA[<p>鍙互閫氳繃鍙嶆眹緙栨潵鐭ラ亾鎺ュ彛鍑芥暟鐨勫弬鏁幫紝寤鴻浣跨敤W32DSM鏉ュ垎鏋愶紝涔熷彲浠ョ洿鎺ヤ嬌鐢╒C鏉ュ垎鏋愶紝灝辨槸楹葷儲涓鐐廣?nbsp;      <br>  鐜板湪浣跨敤W32DSM鏉ュ叿浣撹鏄庯細       <br>  1銆傚厛鎵撳紑闇瑕佸垎鏋愮殑DLL錛岀劧鍚庨氳繃鑿滃崟鍔熻兘-銆嬪嚭鍙f潵鎵懼埌闇瑕佸垎鏋愮殑鍑芥暟錛屽弻鍑誨氨鍙互浜嗐?nbsp;      <br>  瀹冨彲浠ョ洿鎺ュ畾浣嶅埌璇ュ嚱鏁般?nbsp;      <br>  2銆傜湅鍑嗚鍑芥暟鐨勫叆鍙o紝涓鑸嚱鏁版槸浠ヤ互涓嬩唬鐮佷綔涓哄叆鍙g偣鐨勩?nbsp;      <br>  push     ebp       <br>  mov         ebp,     esp       <br>  ...       <br>  3銆傜劧鍚庡線涓嬫壘鍒拌鍑芥暟鐨勫嚭鍙o紝涓鑸嚱鏁板嚭鍙f湁浠ヤ笅璇彞銆?nbsp;      <br>  ...       <br>  ret         xxxx;//鍏朵腑xxxx灝辨槸鍑芥暟宸暟鐨勬墍鏈夌殑瀛楄妭鏁幫紝涓?鐨勫嶆暟錛寈xxx闄や互4寰楀埌鐨勭粨鏋?nbsp;      <br>  灝辨槸鍙傛暟鐨勪釜鏁般?nbsp;      <br>  鍏朵腑鍙傛暟瀛樻斁鐨勫湴鏂癸細       <br>  ebp+08                     //絎竴涓弬鏁?nbsp;      <br>  ebp+0C                     //絎簩涓弬鏁?nbsp;      <br>  ebp+10                     //絎笁涓弬鏁?nbsp;      <br>  ebp+14                     //絎洓涓弬鏁?nbsp;      <br>  ebp+18                     //絎簲涓弬鏁?nbsp;      <br>  ebp+1C                     //絎叚涓弬鏁?nbsp;      <br>  銆傘傘傘?nbsp;      <br>  -------------------------------------------       <br>  榪樻湁涓縐嶇粡甯哥湅鍒扮殑璋冪敤鏂瑰紡錛?nbsp;      <br>  sub     esp,xxxx                     //寮澶撮儴鍒?nbsp;      <br>  //鍑芥暟鐨勫唴瀹?nbsp;      <br>  銆傘傘?nbsp;      <br>  //鍑芥暟鐨勫唴瀹?nbsp;      <br>  add     esp,xxxx       <br>  ret                                                         //緇撳熬閮ㄥ垎       <br>  鍏朵腑xxxx/4鐨勭粨鏋滀篃鏄弬鏁扮殑涓暟銆?nbsp;              <br>  -------------------------------------------------       <br>  榪樻湁涓縐嶈皟鐢ㄦ柟寮忥細       <br>  鏈変簬璇ュ嚱鏁版瘮杈冪畝鍗曪紝娌℃湁鍙傛暟鐨勫帇鏍堣繃紼嬶紝       <br>  閲岄潰鐨?nbsp;      <br>  esp+04灝辨槸絎竴涓弬鏁?nbsp;      <br>  esp+08灝辨槸絎簩涓弬鏁?nbsp;      <br>  銆傘傘?nbsp;      <br>  esp+xx灝辨槸絎瑇x/4涓弬鏁?nbsp;      <br>  浣犺鐪嬪埌鐨剎x鐨勬渶澶ф暟闄や互4鍚庣殑緇撴灉錛屽氨鏄鍑芥暟鎵浼犻掔殑鍙傛暟鐨勪釜鏁般?nbsp;      <br>  ----------------------------------------------       <br>  鍒扮幇鍦ㄤ綅緗紝浣犲簲璇ヨ兘寰堟竻妤氱殑鐪嬪埌浜嗕紶閫掔殑鍙傛暟鐨勪釜鏁般傝嚦浜庝紶閫掔殑鏄簺浠涔堝唴瀹癸紝榪橀渶瑕佽繘涓姝ョ殑鍒嗘瀽銆?nbsp;      <br>  鏈鏂逛究鐨勫姙娉曞氨鏄厛鎵懼埌鏄粈涔堣蔣浠跺湪璋冪敤姝ゅ嚱鏁幫紝鐒跺悗閫氳繃璋冭瘯鐨勬妧鏈紝鎵懼埌璇ュ嚱鏁拌璋冪敤鐨勫湴鏂廣備竴鑸兘鏄疨USH鎸囦護       <br>  鏉ュ疄鐜板弬鏁扮殑浼犻掔殑銆傝繖鏃跺彲浠ョ湅涓涓嬪叿浣撴槸浠涔堜笢瑗胯鍘嬪叆鍫嗘爤浜嗭紝涓鑸潵璇達紝濡傛灉鍙傛暟鏄暣鏁幫紝涓鐪嬪氨鍙互鐭ラ亾浜嗭紝       <br>  濡傛灉鏄瓧絎︿覆鐨勮瘽涔熸槸姣旇緝綆鍗曠殑錛屽彧瑕佸埌閭d釜鍦板潃涓婇潰鍘葷湅涓涓嬪氨鍙互浜嗐?nbsp;      <br>  濡傛灉浼犻掔殑緇撴瀯鐨勮瘽錛屾病鏈夊緢鏂逛究鐨勫姙娉曡В鍐籌紝灝辨槸璇繪噦璇ユ眹緙栧氨鍙互浜嗐傚浜庝互涓婄殑鍒嗘瀽錛屾湰浜哄彧鍏跺埌浜嗘姏鐮栧紩鐜夛紝       <br>  甯屾湜瀵瑰ぇ瀹舵湁鐐圭敤澶勩?</p><img src ="http://m.shnenglu.com/jans2002/aggbug/98543.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/jans2002/" target="_blank">jans2002</a> 2009-10-14 08:37 <a href="http://m.shnenglu.com/jans2002/archive/2009/10/14/98543.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>(杞?涓涓皬鎶宸э細SFP Overwrite錛堜互c璇█涓哄疄渚嬶級http://m.shnenglu.com/jans2002/archive/2009/09/29/97511.htmljans2002jans2002Tue, 29 Sep 2009 01:09:00 GMThttp://m.shnenglu.com/jans2002/archive/2009/09/29/97511.htmlhttp://m.shnenglu.com/jans2002/comments/97511.htmlhttp://m.shnenglu.com/jans2002/archive/2009/09/29/97511.html#Feedback0http://m.shnenglu.com/jans2002/comments/commentRss/97511.htmlhttp://m.shnenglu.com/jans2002/services/trackbacks/97511.html

SFP Overwrite
I'd like a share a little trick I figured out today. I'm sure it has been done before and probably many times but its new to me so I'll describe it here. I asked myself if anything cool could be achieved by overwriting the Saved Frame Pointer instead of the Return Address. I'm not sure what sort of security-related attacks could be leveraged by doing this, but I did find that its possible to affect the program flow in the calling function. This is just another trick to change the flow of execution and even works on a non-executable stack.
The vulnerable program source code
The attack program source code
EBP and Local Variables
The extended base pointer is a register used by the CPU as base for the current stack frame. As we discussed earlier, the EBP for the function that called the current one is stored in the current function's Saved Frame Pointer. The EBP points to this SFP; in this way, there is a chain of saved EBPs for each stack frame. Check out the EIP Redirection page for more details about this. The location of the current stack frame's SFP is stored in the Extended Base Pointer.鍚嶇О:  sfptut3.jpg
鏌ョ湅嬈℃暟: 22
鏂囦歡澶у皬:  11.3 KB
Keeping track of the chain of the program's stack frames is not the only purpose of the EBP/SFPs. As the name implies, the Extended Base Pointer register holds an address that is used as the "base" of the current stack frame (this address is the frame's SFP). The code in the current function references local variables using EBP as a base. For example, the C code for setting a variable equal to 3 is myVar = 3;. This might be assembled into something like: MOV SS:[EBP - 4], 0x03. This means that the local variable myVar is referred to as "the address on the stack stored in EBP, minus 4 bytes" by the assembled code. Another variable in the same function called myVar2 might be located at SS:[EBP - 8]. We can see that if an attacker could change the value of EBP, they could also change where the code thinks local variables are.
Using SFP to Modify EBP
鍚嶇О:  sfptut1.jpg
鏌ョ湅嬈℃暟: 23
鏂囦歡澶у皬:  14.8 KB
Imagine that there is function called FunctionA that is not vulnerable to any sort of buffer overflow. Inside it is a local integer variable that is used by the function later on. Before the variable is used, another function called FunctionB is called. This one happens to be vulnerable to a buffer overflow. Our goal is to trick FunctionA into using a variable that we define instead of the one that it declared.
We wait until the execution reaches FunctionB and we are able to input our malicious buffer. At the beginning we'll have the value of the fake variable that FunctionA will be tricked into using. From there, we pad the buffer with junk until the saved frame pointer is reached. Now we push the address on the stack that is directly below our fake variable. The reason we do this is that FunctionA references its real variable as SS:[ebp - 4]. Therefore, our injected EBP must be 4 bytes beyond our fake variable. By setting it up in this way, if we can manage to get that address into the Extended Base Pointer while FunctionA is executing; our fake variable will be referenced instead of the real one. We are not overwriting the value in the real variable. Instead, we are changing FunctionA's perception of its location to an address inside the buffer that we control.
The Target
Now its time to put our attack into a context. At the top of the source code, you'll notice the vulnerable test() function. All it does is declare a 5 byte buffer and fail to protect it while its being filled with user input. The main() function declares a local integer variable (4 bytes) and feeds the decimal value 3 into it. Main() then calls the test() function which asks the user for input but doesn't do anything with it. After test() returns, a loop is entered. The loop keeping looping as long as the integer c is greater than zero. Each time it repeats, the value of c is decreased by one and "Later" is displayed on the screen. Overall, this thing prints that word c times. Because the value of this integer was set to 3 earlier, this means that "Later" is printed 3 times by this loop. 鍚嶇О:  sfptut2.jpg
鏌ョ湅嬈℃暟: 21
鏂囦歡澶у皬:  10.9 KB
We will trick this program into thinking that a variable we create using the vulnerable buffer is actually c. By filling this fake variable with the decimal value 500,000,001, we'll make this loop run and print "Later" 500 million and one times instead of the expected three.
Buiding the Attack
As before, we'll be writing a program in C that will feed a malicious string into the input of the vulnerable program. Because our ultimate goal is to overwrite the test() function's SFP, we'll need to pad the string appropriately to get there. The first 4 bytes of the attack string will be the value of our fake variable that main() will eventually use in its loop. These bytes need to equal the goal of 500,000,001 so we'll feed "\x01\x65\xCD\x1D" first. The next four do not matter in this case, but take note that they will become main()'s fake SFP. From here use OllyDbg to find the distance between this fake main() SFP and test()'s SFP. If you are unsure where the test() function's SFP is, you can always step the program until inside test() and check the EBP register. You'll find that the buffer begins at 0x0027FF00 and the test() function's SFP is located at 0x0027FF18. After converting to decimal and subtracting the 8 bytes we already used up so far, it means we'll need to add 16 bytes of padding to reach test()'s SFP.
鍚嶇О:  sfptut4.jpg
鏌ョ湅嬈℃暟: 21
鏂囦歡澶у皬:  11.1 KB
Next we'll actually overwrite the SFP. Have a look at the main() function and you'll find that the loop references the variable c as SS:[EBP - 4]. This means that if we want it to reference that 4 byte value at the beginning of the buffer instead, we need main()'s EBP to point to the address 4 bytes beyond the beginning of our attack buffer. We've already pointed out that any value we can sneak into test()'s SFP will end up in the EBP when main() returns. So we end the attack string with the following 3 bytes: "\x04\xFF\x27". The value is chosen because 0x0027FF04 - 4 is the address of our fake variable. Writing all four bytes is, again, not necessary because gets() automatically sticks a null byte at the end of the string inputted.
Final Overview
By crafting the above buffer and ensuring that the last 3 bytes overwrite test()'s SFP, we directly control EBP when test() returns back to main(). Because main() uses EBP to reference an important variable c and we control EBP; we make main() think that c is actually where our old overwritten buffer began. The data is still there because there was no reason for the program to erase/modify it. Because c is referenced as SS:[EBP - 4] in main(), we need that overwritten Stack Frame Pointer to point to the address four bytes below the fake variable location on the stack. When main uses our fake EBP to reference variable c is it will subtract 4 from it and find our fake variable value. This was filled in with the decimal value of 500,000,001. Main() runs the loop to print "Later" a number of times determined by c. So by doing all of this trickery we can make the program display "Later" 500,000,001 times instead of 3.



jans2002 2009-09-29 09:09 鍙戣〃璇勮
]]>
鑿滈笩瀵笰spectC++ Add-In for Microsoft&reg; Visual C++&reg;鎻掍歡鐨勭牬瑙h繃紼?/title><link>http://m.shnenglu.com/jans2002/archive/2009/08/14/93354.html</link><dc:creator>jans2002</dc:creator><author>jans2002</author><pubDate>Fri, 14 Aug 2009 09:59:00 GMT</pubDate><guid>http://m.shnenglu.com/jans2002/archive/2009/08/14/93354.html</guid><wfw:comment>http://m.shnenglu.com/jans2002/comments/93354.html</wfw:comment><comments>http://m.shnenglu.com/jans2002/archive/2009/08/14/93354.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://m.shnenglu.com/jans2002/comments/commentRss/93354.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/jans2002/services/trackbacks/93354.html</trackback:ping><description><![CDATA[<p>AspectC++ Add-In for Microsoft® Visual C++® <br />http://www.pure-systems.com/fileadmin/downloads/acaddin/Aspectc-AddIn-Setup-010101.exe<br />鎴戠敤鐨勬槸VS2003鐜<br />璋冭瘯鐩爣錛欳:\Program Files\pure-systems\AspectC++ Add-In\bin\CPPAddin.dll<br />宸ュ叿錛氱敤OD璋冭瘯錛孖DA+Hex-rays鍒嗘瀽<br />閲嶇偣闆嗕腑鍦ㄤ互涓嬪嚑涓湴鍧<br />0x10008e60 寮硅鍙枃浠惰闂殑瀵硅瘽妗?br />0x10017a20 瑙f瀽xml鏍煎紡鐨勮鍙枃浠?br />0x10017730 璨屼技璁稿彲媯鏌ョ殑鍦版柟<br />榪欎釜鏄?br />0x10008e60鐨勭敱Hex-ray鍒嗘瀽鍑烘潵鐨勪吉浠g爜, </p><p>浠g爜:</p><pre><span style="color: #0000ff">char</span> __usercall sub_1000E860<al>(<span style="color: #0000ff">int</span> a1<ebx>) { <span style="color: #0000ff">int</span> ST14_4_0; <span style="color: #008000">// ST14_4@0</span> <span style="color: #0000ff">int</span> v2; <span style="color: #008000">// ST10_4@1</span> <span style="color: #0000ff">const</span> CHAR *v3; <span style="color: #008000">// eax@3</span> <span style="color: #0000ff">const</span> CHAR *v4; <span style="color: #008000">// eax@10</span> <span style="color: #0000ff">int</span> v6; <span style="color: #008000">// eax@2</span> <span style="color: #0000ff">char</span> v7; <span style="color: #008000">// bl@2</span> <span style="color: #0000ff">char</span> v8; <span style="color: #008000">// al@9</span> <span style="color: #0000ff">int</span> v9; <span style="color: #008000">// [sp+Ch] [bp-9Ch]@1</span> <span style="color: #0000ff">signed</span> <span style="color: #0000ff">int</span> v10; <span style="color: #008000">// [sp+A4h] [bp-4h]@1</span> <span style="color: #0000ff">char</span> v11; <span style="color: #008000">// [sp+10h] [bp-98h]@1</span> <span style="color: #0000ff">char</span> v12; <span style="color: #008000">// [sp+48h] [bp-60h]@2</span> <span style="color: #0000ff">char</span> v13; <span style="color: #008000">// [sp+2Ch] [bp-7Ch]@2</span> LPCSTR lpText; <span style="color: #008000">// [sp+14h] [bp-94h]@3</span> <span style="color: #0000ff">unsigned</span> <span style="color: #0000ff">int</span> v15; <span style="color: #008000">// [sp+28h] [bp-80h]@3</span> <span style="color: #0000ff">char</span> v16; <span style="color: #008000">// [sp+64h] [bp-44h]@15</span> BYTE3(v9) = 0; sub_10016AA0(); v10 = 0; std__basic_string_char_std__char_traits_char__std__allocator_char____basic_string_char_std__char_traits_char__std__allocator_char__(&v11); LOBYTE(v10) = 1; v2 = a1; <span style="color: #0000ff">while</span> ( 1 ) { sub_100169B0(16, (<span style="color: #0000ff">int</span>)&v12); LOBYTE(v10) = 2; v6 = std__operator_(&v13, v6, "<span style="color: #8b0000">\\etc\\licence</span>"); LOBYTE(v10) = 3; v7 = sub_10017A20((<span style="color: #0000ff">int</span>)&unk_10024460, v6, (<span style="color: #0000ff">int</span>)&v11) == 0; LOBYTE(v10) = 2; std__basic_string_char_std__char_traits_char__std__allocator_char_____basic_string_char_std__char_traits_char__std__allocator_char__(&v13); LOBYTE(v10) = 1; std__basic_string_char_std__char_traits_char__std__allocator_char_____basic_string_char_std__char_traits_char__std__allocator_char__(&v12); <span style="color: #0000ff">if</span> ( !v7 ) <span style="color: #0000ff">break</span>; std__basic_string_char_std__char_traits_char__std__allocator_char____operator__( &v11, "<span style="color: #8b0000">\nThe add-in will not work without a valid licence.\n\nInstall the licence file now?</span>", v2); v3 = lpText; <span style="color: #0000ff">if</span> ( v15 < 0x10 ) v3 = (<span style="color: #0000ff">const</span> CHAR *)&lpText; <span style="color: #0000ff">if</span> ( MessageBoxA(0, v3, "<span style="color: #8b0000">AspectC++ Add-In for Visual Studio .NET</span>", 0x24u) != 6 ) <span style="color: #0000ff">break</span>; <span style="color: #0000ff">if</span> ( !sub_1000E690() ) { MessageBoxA(0, "<span style="color: #8b0000">Installation of licence file failed.</span>", "<span style="color: #8b0000">AspectC++ Add-In</span>", 0x40u); <span style="color: #0000ff">break</span>; } } <span style="color: #0000ff">if</span> ( byte_10024465 ) { sub_10017730((<span style="color: #0000ff">int</span>)&unk_10024460, 16, (<span style="color: #0000ff">int</span>)&v11); <span style="color: #0000ff">if</span> ( v8 && (<span style="color: #0000ff">unsigned</span> __int8)sub_10017520(&v11) != 1 ) { BYTE3(v9) = 1; } <span style="color: #0000ff">else</span> { std__basic_string_char_std__char_traits_char__std__allocator_char____operator__( &v11, "<span style="color: #8b0000">\nThe add-in will not work.</span>", ST14_4_0); v4 = lpText; <span style="color: #0000ff">if</span> ( v15 < 0x10 ) v4 = (<span style="color: #0000ff">const</span> CHAR *)&lpText; MessageBoxA(0, v4, "<span style="color: #8b0000">AspectC++ Add-In</span>", 0x40u); } } LOBYTE(v10) = 0; std__basic_string_char_std__char_traits_char__std__allocator_char_____basic_string_char_std__char_traits_char__std__allocator_char__(&v11); v10 = -1; sub_10016910((<span style="color: #0000ff">int</span>)&v16); <span style="color: #0000ff">return</span> BYTE3(v9); }</pre><pre> </pre> <p>鍩烘湰涓婂彲浠ュ緱鍑洪粯璁ゆ槸鍒嗘瀽<br />C:\Program Files\pure-systems\AspectC++ Add-In\etc\licence 璁稿彲鏂囦歡<br />鍒嗘瀽榪囩▼搴旇鍦?x10017a20閲? </p><p>浠g爜:</p><pre><span style="color: #0000ff">char</span> __thiscall sub_10017A20(<span style="color: #0000ff">int</span> <span style="color: #0000ff">this</span>, <span style="color: #0000ff">int</span> a2, <span style="color: #0000ff">int</span> a3) { <span style="color: #0000ff">int</span> v3; <span style="color: #008000">// ebp@1</span> <span style="color: #0000ff">int</span> v4; <span style="color: #008000">// esi@1</span> <span style="color: #0000ff">int</span> v5; <span style="color: #008000">// eax@2</span> <span style="color: #0000ff">int</span> v6; <span style="color: #008000">// eax@4</span> <span style="color: #0000ff">int</span> v7; <span style="color: #008000">// edi@5</span> <span style="color: #0000ff">char</span> result; <span style="color: #008000">// al@8</span> <span style="color: #0000ff">int</span> v9; <span style="color: #008000">// ecx@1</span> <span style="color: #0000ff">int</span> v10; <span style="color: #008000">// eax@5</span> <span style="color: #0000ff">int</span> v11; <span style="color: #008000">// eax@6</span> <span style="color: #0000ff">int</span> v12; <span style="color: #008000">// ST04_4@6</span> <span style="color: #0000ff">char</span> v13; <span style="color: #008000">// bl@6</span> <span style="color: #0000ff">char</span> v14; <span style="color: #008000">// [sp+Ch] [bp-28h]@6</span> <span style="color: #0000ff">signed</span> <span style="color: #0000ff">int</span> v15; <span style="color: #008000">// [sp+30h] [bp-4h]@6</span> v3 = a3; v4 = <span style="color: #0000ff">this</span>; v9 = <span style="color: #0000ff">this</span> + 96; *(_DWORD *)v9 = 0; *(_DWORD *)(v9 + 4) = 0; *(_DWORD *)(v9 + 8) = 0; *(_DWORD *)(v9 + 12) = 0; *(_BYTE *)(v4 + 5) = 0; std__basic_string_char_std__char_traits_char__std__allocator_char____operator_(v3, "<span style="color: #8b0000">Loading licence file failed.</span>"); <span style="color: #0000ff">if</span> ( *(_DWORD *)(a2 + 24) < 0x10u ) v5 = a2 + 4; <span style="color: #0000ff">else</span> v5 = *(_DWORD *)(a2 + 4); v6 = xmlParseFile(v5); *(_DWORD *)v4 = v6; <span style="color: #0000ff">if</span> ( v6 && (v10 = xmlDocGetRootElement(v6), v7 = v10, v10) && (v11 = std__basic_string_char_std__char_traits_char__std__allocator_char____basic_string_char_std__char_traits_char__std__allocator_char__( &v14, "<span style="color: #8b0000">licence</span>"), v12 = *(_DWORD *)(v7 + 8), v15 = 0, v13 = std__operator__(v11, v12), v15 = -1, std__basic_string_char_std__char_traits_char__std__allocator_char_____basic_string_char_std__char_traits_char__std__allocator_char__(&v14), v13) && sub_10017930(v7) ) { *(_BYTE *)(v4 + 5) = 1; sub_10017730(v4, v3, v3); result = 1; } <span style="color: #0000ff">else</span> { result = 0; } <span style="color: #0000ff">return</span> result; }</pre> <p>榪欐槸0x10017730鐨勮繃紼? </p><p>浠g爜:</p><pre><span style="color: #0000ff">void</span> __userpurge sub_10017730(<span style="color: #0000ff">int</span> <span style="color: #0000ff">this</span><ecx>, <span style="color: #0000ff">int</span> ebp0<ebp>, <span style="color: #0000ff">int</span> a2) { <span style="color: #0000ff">int</span> ST18_4_0; <span style="color: #008000">// ST18_4@0</span> <span style="color: #0000ff">int</span> ST1C_4_0; <span style="color: #008000">// ST1C_4@0</span> <span style="color: #0000ff">int</span> v5; <span style="color: #008000">// esi@1</span> <span style="color: #0000ff">signed</span> <span style="color: #0000ff">int</span> v6; <span style="color: #008000">// eax@4</span> <span style="color: #0000ff">int</span> v7; <span style="color: #008000">// ST18_4@6</span> <span style="color: #0000ff">int</span> v8; <span style="color: #008000">// eax@20</span> <span style="color: #0000ff">int</span> v9; <span style="color: #008000">// eax@4</span> <span style="color: #0000ff">int</span> v10; <span style="color: #008000">// ST1C_4@12</span> <span style="color: #0000ff">int</span> v11; <span style="color: #008000">// ST1C_4@18</span> <span style="color: #0000ff">int</span> r; <span style="color: #008000">// [sp+60h] [bp+0h]@1</span> <span style="color: #0000ff">int</span> v13; <span style="color: #008000">// [sp+50h] [bp-10h]@1</span> <span style="color: #0000ff">signed</span> <span style="color: #0000ff">int</span> v14; <span style="color: #008000">// [sp+5Ch] [bp-4h]@3</span> <span style="color: #0000ff">char</span> v15; <span style="color: #008000">// [sp+34h] [bp-2Ch]@4</span> <span style="color: #0000ff">char</span> v16; <span style="color: #008000">// [sp+18h] [bp-48h]@4</span> <span style="color: #0000ff">int</span> v17; <span style="color: #008000">// [sp+1Ch] [bp-44h]@12</span> <span style="color: #0000ff">unsigned</span> <span style="color: #0000ff">int</span> v18; <span style="color: #008000">// [sp+30h] [bp-30h]@20</span> <span style="color: #0000ff">int</span> v19; <span style="color: #008000">// [sp+2Ch] [bp-34h]@22</span> v5 = <span style="color: #0000ff">this</span>; v13 = r ^ dword_100242D0; std__basic_string_char_std__char_traits_char__std__allocator_char____operator_(a2, "<span style="color: #8b0000">Invalid licence file found.</span>"); <span style="color: #0000ff">if</span> ( *(_BYTE *)(v5 + 5) && !*(_BYTE *)(v5 + 4) ) { sub_10017B20((<span style="color: #0000ff">int</span>)&a2, ebp0); v14 = 0; <span style="color: #0000ff">if</span> ( !sub_1001A050((<span style="color: #0000ff">int</span>)&a2) ) { LABEL_23: v14 = -1; sub_1001A060(&a2); <span style="color: #0000ff">goto</span> LABEL_24; } v9 = std__operator_(&v15, v5 + 12, v5 + 40); LOBYTE(v14) = 1; std__operator_(&v16, v9, v5 + 68); LOBYTE(v14) = 3; std__basic_string_char_std__char_traits_char__std__allocator_char_____basic_string_char_std__char_traits_char__std__allocator_char__(&v15); v6 = *(_DWORD *)(v5 + 8); <span style="color: #0000ff">if</span> ( v6 || !*(_DWORD *)(v5 + 96) ) { <span style="color: #0000ff">if</span> ( v6 == 1 && *(_DWORD *)(v5 + 96) && *(_DWORD *)(v5 + 100) && *(_DWORD *)(v5 + 104) && *(_DWORD *)(v5 + 108) ) { std__basic_string_char_std__char_traits_char__std__allocator_char____operator__(&v16, "<span style="color: #8b0000">evaluation</span>", ST18_4_0); std__basic_string_char_std__char_traits_char__std__allocator_char____operator__( &v17, *(_DWORD *)(v5 + 96), ST1C_4_0); std__basic_string_char_std__char_traits_char__std__allocator_char____operator__( &v17, *(_DWORD *)(v5 + 100), v10); std__basic_string_char_std__char_traits_char__std__allocator_char____operator__( &v17, *(_DWORD *)(v5 + 104), ST1C_4_0); v7 = *(_DWORD *)(v5 + 108); } <span style="color: #0000ff">else</span> { <span style="color: #0000ff">if</span> ( v6 != 2 || !*(_DWORD *)(v5 + 96) || !*(_DWORD *)(v5 + 100) || !*(_DWORD *)(v5 + 104) || !*(_DWORD *)(v5 + 108) ) <span style="color: #0000ff">goto</span> LABEL_20; std__basic_string_char_std__char_traits_char__std__allocator_char____operator__(&v16, "<span style="color: #8b0000">user</span>", ST18_4_0); std__basic_string_char_std__char_traits_char__std__allocator_char____operator__( &v17, *(_DWORD *)(v5 + 96), ST1C_4_0); std__basic_string_char_std__char_traits_char__std__allocator_char____operator__( &v17, *(_DWORD *)(v5 + 100), v11); std__basic_string_char_std__char_traits_char__std__allocator_char____operator__( &v17, *(_DWORD *)(v5 + 104), ST1C_4_0); v7 = *(_DWORD *)(v5 + 108); } } <span style="color: #0000ff">else</span> { std__basic_string_char_std__char_traits_char__std__allocator_char____operator__(&v16, "<span style="color: #8b0000">beta</span>", ST18_4_0); v7 = *(_DWORD *)(v5 + 96); } std__basic_string_char_std__char_traits_char__std__allocator_char____operator__(&v17, v7, ST1C_4_0); LABEL_20: v8 = v17; <span style="color: #0000ff">if</span> ( v18 < 0x10 ) v8 = (<span style="color: #0000ff">int</span>)&v17; *(_BYTE *)(v5 + 4) = sub_10019E30(v5 + 112, v8, v19, (<span style="color: #0000ff">int</span>)&a2); LOBYTE(v14) = 0; std__basic_string_char_std__char_traits_char__std__allocator_char_____basic_string_char_std__char_traits_char__std__allocator_char__(&v16); <span style="color: #0000ff">goto</span> LABEL_23; } LABEL_24: sub_1001A7B0( r ^ v13, ebp0); }</pre> <p> </p> <p>鏄ㄥぉ鎴戣嚜宸辮皟璇曠殑鏃跺欎篃鐘簡涓涓敊璇紝灝辨槸璋冭瘯CppAddin.dll寰堢棝鑻︼紝嫻垂涓嶅皯鏃墮棿鍜屽垎鏁e緢澶氱殑綺懼姏錛屼腑闂磋佹槸鍙楀埌Va_X.dll鐨勫共鎵幫紝鑰屼笖msdev.exe鍦–ppAddin娌″姞杞芥椂娌℃硶鐩存帴涓嬫柇鐐癸紝蹇呴』寰楀湪OD涓緗竴涓柊妯″潡鍔犺澆鐨勬柇鐐癸紙閫夐」->璋冭瘯閫夐」->浜嬩歡->涓柇浜庢柊妯″潡錛?榪欐牱涓嬫潵錛屾瘡嬈¤皟璇曞け璐ュ悗閲嶅惎鐨勮繃紼嬪緢鏄極闀匡紝嫻垂浜嗕笉灝戞椂闂達紝鍙戝笘瀛愮殑姹傚姪鐨勬椂鍊欙紝鎴戜負浜嗗ぇ澶т滑緇欐垜鑳芥柟渚跨殑瑙e喅闂錛屽敖閲忔妸闈炴妧鏈棶棰橀兘璇曢獙浜嗕竴涓嬶紝浠ュ厤澶уぇ浠榪欎簺闂鍥頒綇浜嗭紝涓鎬掍箣涓嬩笉緇欐垜綆℃垜浜嗐備絾鏄繖鏍蜂竴鏉ワ紝涔熶負鎴戣嚜宸辮В鍐沖拰鍙戠幇闂鍔犲揩浜嗛熷害銆?br />鎬葷粨涓涓嬶細<br />    1.瑙e喅闂瑕佷笢鏂逛笉浜紝瑗挎柟浜紝涓嶈灝嗚嚜宸辯簿鍔涙秷鑰楀湪榪滅闂鏈韓鐨勫湴鏂?br />    2.鍧氭寔灝辨槸鑳滃埄錛屽摢鎬曟槸鑿滈笩錛屼笉鎳傚灝戞眹緙栵紙鐪嬩唬鐮佽繕寰楅潬浼熷ぇ銆佸厜鑽c佹紜殑F5錛夛紝涔熻兘鍙栧緱鎴愮嘩<br />涓嬮潰鍐欏啓鍒嗘瀽榪囩▼錛?br />鍏跺疄鏄ㄥぉ宸茬粡鎵懼埌浜嗗叧閿殑榪囩▼錛岄偅灝辨槸0x10017a20錛岃繖閲岄潰灝辨槸鍒嗘瀽xml鏍煎紡鐨勮鍙枃浠?br />榪欓噷闈㈡湁涓や釜璋冪敤錛宻ub_10017930()鍜?sub_10017730()<br />澶ф鍙互鐪嬪緱鍑烘潵錛宻ub_10017930鍙備笌浜唜ml鏍煎紡鐨勮鍙暟鎹殑瑙f瀽榪囩▼錛屽畠璋冪敤鎴愬姛涔嬪悗錛屾墠璋冪敤10017730瀵規暟鎹繘琛岄獙璇侊紝瑕佸垎鏋愯鍙暟鎹牸寮忥紝蹇呴』鐮旂┒10017930 </p><p>浠g爜:</p><pre><span style="color: #0000ff">char</span> __stdcall sub_10017930(<span style="color: #0000ff">int</span> a1) { <span style="color: #0000ff">int</span> v1; <span style="color: #008000">// ebp@1</span> <span style="color: #0000ff">int</span> v2; <span style="color: #008000">// esi@1</span> <span style="color: #0000ff">int</span> v3; <span style="color: #008000">// esi@3</span> <span style="color: #0000ff">char</span> result; <span style="color: #008000">// al@7</span> <span style="color: #0000ff">int</span> v5; <span style="color: #008000">// eax@1</span> <span style="color: #0000ff">int</span> v6; <span style="color: #008000">// eax@2</span> <span style="color: #0000ff">char</span> v7; <span style="color: #008000">// bl@2</span> <span style="color: #0000ff">char</span> v8; <span style="color: #008000">// [sp+Ch] [bp-28h]@2</span> <span style="color: #0000ff">signed</span> <span style="color: #0000ff">int</span> v9; <span style="color: #008000">// [sp+30h] [bp-4h]@2</span> v1 = a1; v5 = xmlGetProp(a1, "<span style="color: #8b0000">version</span>"); v2 = v5; <span style="color: #0000ff">if</span> ( v5 && (v6 = std__basic_string_char_std__char_traits_char__std__allocator_char____basic_string_char_std__char_traits_char__std__allocator_char__( &v8, L"<span style="color: #8b0000">1</span>"), v9 = 0, v7 = std__operator__(v6, v2), v9 = -1, std__basic_string_char_std__char_traits_char__std__allocator_char_____basic_string_char_std__char_traits_char__std__allocator_char__(&v8), v7) ) { v3 = *(_DWORD *)(v1 + 12); result = (<span style="color: #0000ff">unsigned</span> __int8)sub_10016D60(*(_DWORD *)(v1 + 12)) && (<span style="color: #0000ff">unsigned</span> __int8)sub_10016E70(v3) && (<span style="color: #0000ff">unsigned</span> __int8)sub_10017570(v3) && (<span style="color: #0000ff">unsigned</span> __int8)sub_100172C0(v3); } <span style="color: #0000ff">else</span> { result = 0; } <span style="color: #0000ff">return</span> result; }</pre> <p>鍦ㄨ繖閲岄潰鍙栦簡xml鐨勪竴涓睘鎬у紇ersion,騫朵笖榪樻湁鍥涗釜閮戒笉鑳藉け璐ョ殑榪囩▼:<br />10016d60  鍙杙roduct 鍏冪礌<br />10016e70  鍙朿reation 鍏冪礌<br />10017570  鍙杢ype鍏冪礌<br />100172c0  鍙杝ignature鍏冪礌<br />涓轟簡鐔熸倝libxml,鎴戠壒鎰忕紪鍐欎簡涓孌靛吀鍨媗ibxml鐢ㄦ硶,騫跺垎鏋愪簡鍏跺弽鍚戝伐紼嬪悗鐨勪唬鐮侊紝 </p><p>浠g爜:</p><pre> xmlDocPtr doc = NULL; xmlNodePtr cur = NULL; <span style="color: #0000ff">string</span> filename("<span style="color: #8b0000">test.xml</span>"); doc = xmlParseFile(filename.c_str()); cur = xmlDocGetRootElement(doc); <span style="color: #0000ff">if</span> (xmlStrcmp(cur->name, BAD_CAST "<span style="color: #8b0000">licence</span>")) { fprintf(stderr,"<span style="color: #8b0000">document of the wrong type, root node != mail</span>"); xmlFreeDoc(doc); <span style="color: #008000">/*return -1; */</span> } cur = cur->xmlChildrenNode; xmlNodePtr propNodePtr = cur; <span style="color: #0000ff">while</span>(cur != NULL) { <span style="color: #008000">//¨¨?3??¨²¦Ì??D¦Ì??¨²¨¨Y</span> <span style="color: #0000ff">if</span> ((!xmlStrcmp(cur->name, (<span style="color: #0000ff">const</span> xmlChar *)"<span style="color: #8b0000">product</span>"))) { <span style="color: #0000ff">string</span> name; <span style="color: #0000ff">string</span> version; xmlChar* szAttr = xmlGetProp(cur,BAD_CAST "<span style="color: #8b0000">name</span>"); name=(<span style="color: #0000ff">char</span>*)szAttr; szAttr=xmlGetProp(cur,BAD_CAST "<span style="color: #8b0000">version</span>"); version=(<span style="color: #0000ff">const</span> <span style="color: #0000ff">char</span> *)szAttr; cout<<"<span style="color: #8b0000">Name:</span>"<<name<<"<span style="color: #8b0000"> Version:</span>"<<version<<endl; xmlFree(szAttr); } cur=cur->next; } xmlFreeDoc(doc); <span style="color: #008000">/*return 0;*/</span></pre> <p>寰楀嚭鐨勭粨璁烘槸錛屽嚒鏄睘鎬у肩殑鑾峰彇錛岄兘浼氳皟鐢▁mlGetProp錛岃屽瓙鍏冪礌鐨勮幏鍙栧垯鏄氳繃鐩存帴璁塊棶鍐呭瓨緇撴瀯鎴栬呯被浼糲++鐨勫嚱鏁拌闂紝涓嶄細鐪嬪埌鍑芥暟鍚嶇О鐨勫紩鐢紝鏍規嵁榪欎竴緇撹鍜屽叿浣撶殑璋冭瘯錛屽ぇ鑷存帹鍑烘潵licence鏂囦歡鐨勭粨鏋勫涓? </p><p>浠g爜:</p><pre><span style="color: #0000ff"><?</span>xml version="1.0" encoding="UTF-8"<span style="color: #0000ff">?></span> <span style="color: #0000ff"><</span><span style="color: #800000">licence</span> <span style="color: #ff0000">version</span>=<span style="color: #0000ff">"1"</span><span style="color: #0000ff">></span> <span style="color: #0000ff"><</span><span style="color: #800000">product</span> <span style="color: #ff0000">name</span>=<span style="color: #0000ff">"aspect"</span> <span style="color: #ff0000">version</span>=<span style="color: #0000ff">"1.0"</span><span style="color: #0000ff">/></span> <span style="color: #0000ff"><</span><span style="color: #800000">product</span> <span style="color: #ff0000">name</span>=<span style="color: #0000ff">"pointcut"</span> <span style="color: #ff0000">version</span>=<span style="color: #0000ff">"1.0"</span> <span style="color: #0000ff">/></span> <span style="color: #0000ff"><</span><span style="color: #800000">product</span> <span style="color: #ff0000">name</span>=<span style="color: #0000ff">"advice"</span> <span style="color: #ff0000">version</span>=<span style="color: #0000ff">"1.0"</span> <span style="color: #0000ff">/></span> <span style="color: #0000ff"><</span><span style="color: #800000">product</span> <span style="color: #ff0000">name</span>=<span style="color: #0000ff">"slice"</span> <span style="color: #ff0000">version</span>=<span style="color: #0000ff">"1.0"</span> <span style="color: #0000ff">/></span> <span style="color: #0000ff"><</span><span style="color: #800000">creation</span> <span style="color: #ff0000">date</span>=<span style="color: #0000ff">"2009-8-13"</span><span style="color: #0000ff">/></span> <span style="color: #0000ff"><</span><span style="color: #800000">type</span> <span style="color: #ff0000">name</span>=<span style="color: #0000ff">"user"</span><span style="color: #0000ff">></span> <span style="color: #0000ff"><</span><span style="color: #800000">data</span> <span style="color: #ff0000">code</span>=<span style="color: #0000ff">"xxxx"</span> <span style="color: #ff0000">name</span>=<span style="color: #0000ff">"jans2002"</span> <span style="color: #ff0000">email</span>=<span style="color: #0000ff">"jans2002@gmail.com"</span> <span style="color: #ff0000">regnr</span>=<span style="color: #0000ff">"ccccc"</span><span style="color: #0000ff">/></span> <span style="color: #0000ff"></</span><span style="color: #800000">type</span><span style="color: #0000ff">></span> <span style="color: #0000ff"><</span><span style="color: #800000">signature</span> <span style="color: #ff0000">sign</span>=<span style="color: #0000ff">"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"</span> <span style="color: #0000ff">/></span> <span style="color: #0000ff"></</span><span style="color: #800000">licence</span><span style="color: #0000ff">></span></pre> <p> </p> <p>鏈変簡榪欎釜licence鏂囦歡錛屾妸瀹冩斁鍒?br />C:\Program Files\pure-systems\AspectC++ Add-In\etc\鐩綍涓?br />涓鍒囬棶棰樺氨鍙樺緱綆鍗曚簡,欏哄埄鎵ц瀹屼簡0x10017930錛屼竴璺潃鍒?x10017730 </p><p>浠g爜:</p><pre><span style="color: #0000ff">int</span> __thiscall sub_10017730(<span style="color: #0000ff">int</span> <span style="color: #0000ff">this</span>, <span style="color: #0000ff">int</span> a2) { <span style="color: #0000ff">int</span> v2; <span style="color: #008000">// esi@1</span> <span style="color: #0000ff">signed</span> <span style="color: #0000ff">int</span> v3; <span style="color: #008000">// eax@4</span> <span style="color: #0000ff">int</span> v4; <span style="color: #008000">// ST14_4@6</span> <span style="color: #0000ff">int</span> v5; <span style="color: #008000">// eax@20</span> <span style="color: #0000ff">int</span> v7; <span style="color: #008000">// eax@4</span> <span style="color: #0000ff">int</span> r; <span style="color: #008000">// [sp+4Ch] [bp+0h]@1</span> <span style="color: #0000ff">int</span> v9; <span style="color: #008000">// [sp+3Ch] [bp-10h]@1</span> <span style="color: #0000ff">signed</span> <span style="color: #0000ff">int</span> v10; <span style="color: #008000">// [sp+48h] [bp-4h]@3</span> <span style="color: #0000ff">char</span> v11; <span style="color: #008000">// [sp+20h] [bp-2Ch]@4</span> <span style="color: #0000ff">char</span> v12; <span style="color: #008000">// [sp+4h] [bp-48h]@4</span> <span style="color: #0000ff">int</span> v13; <span style="color: #008000">// [sp+8h] [bp-44h]@20</span> <span style="color: #0000ff">unsigned</span> <span style="color: #0000ff">int</span> v14; <span style="color: #008000">// [sp+1Ch] [bp-30h]@20</span> <span style="color: #0000ff">int</span> v15; <span style="color: #008000">// [sp+18h] [bp-34h]@22</span> v2 = <span style="color: #0000ff">this</span>; v9 = r ^ dword_100242D0; std__basic_string_char_std__char_traits_char__std__allocator_char____operator_(a2, "<span style="color: #8b0000">Invalid licence file found.</span>"); <span style="color: #0000ff">if</span> ( *(_BYTE *)(v2 + 5) && !*(_BYTE *)(v2 + 4) ) { sub_10017B20(); v10 = 0; <span style="color: #0000ff">if</span> ( !(<span style="color: #0000ff">unsigned</span> __int8)sub_1001A050() ) { LABEL_23: v10 = -1; sub_1001A060(); <span style="color: #0000ff">return</span> sub_1001A7B0(); } v7 = std__operator_(&v11, v2 + 12, v2 + 40); LOBYTE(v10) = 1; std__operator_(&v12, v7, v2 + 68); LOBYTE(v10) = 3; std__basic_string_char_std__char_traits_char__std__allocator_char_____basic_string_char_std__char_traits_char__std__allocator_char__(&v11); v3 = *(_DWORD *)(v2 + 8); <span style="color: #0000ff">if</span> ( v3 || !*(_DWORD *)(v2 + 96) ) { <span style="color: #0000ff">if</span> ( v3 == 1 && *(_DWORD *)(v2 + 96) && *(_DWORD *)(v2 + 100) && *(_DWORD *)(v2 + 104) && *(_DWORD *)(v2 + 108) ) { std__basic_string_char_std__char_traits_char__std__allocator_char____operator__(&v12, "<span style="color: #8b0000">evaluation</span>"); std__basic_string_char_std__char_traits_char__std__allocator_char____operator__(&v12, *(_DWORD *)(v2 + 96)); std__basic_string_char_std__char_traits_char__std__allocator_char____operator__(&v12, *(_DWORD *)(v2 + 100)); std__basic_string_char_std__char_traits_char__std__allocator_char____operator__(&v12, *(_DWORD *)(v2 + 104)); v4 = *(_DWORD *)(v2 + 108); } <span style="color: #0000ff">else</span> { <span style="color: #0000ff">if</span> ( v3 != 2 || !*(_DWORD *)(v2 + 96) || !*(_DWORD *)(v2 + 100) || !*(_DWORD *)(v2 + 104) || !*(_DWORD *)(v2 + 108) ) <span style="color: #0000ff">goto</span> LABEL_20; std__basic_string_char_std__char_traits_char__std__allocator_char____operator__(&v12, "<span style="color: #8b0000">user</span>"); std__basic_string_char_std__char_traits_char__std__allocator_char____operator__(&v12, *(_DWORD *)(v2 + 96)); std__basic_string_char_std__char_traits_char__std__allocator_char____operator__(&v12, *(_DWORD *)(v2 + 100)); std__basic_string_char_std__char_traits_char__std__allocator_char____operator__(&v12, *(_DWORD *)(v2 + 104)); v4 = *(_DWORD *)(v2 + 108); } } <span style="color: #0000ff">else</span> { std__basic_string_char_std__char_traits_char__std__allocator_char____operator__(&v12, "<span style="color: #8b0000">beta</span>"); v4 = *(_DWORD *)(v2 + 96); } std__basic_string_char_std__char_traits_char__std__allocator_char____operator__(&v12, v4); LABEL_20: v5 = v13; <span style="color: #0000ff">if</span> ( v14 < 0x10 ) v5 = (<span style="color: #0000ff">int</span>)&v13; *(_BYTE *)(v2 + 4) = sub_10019E30(v2 + 112, v5, v15, (<span style="color: #0000ff">int</span>)&a2); LOBYTE(v10) = 0; std__basic_string_char_std__char_traits_char__std__allocator_char_____basic_string_char_std__char_traits_char__std__allocator_char__(&v12); <span style="color: #0000ff">goto</span> LABEL_23; } <span style="color: #0000ff">return</span> sub_1001A7B0(); }</pre> <p>鐢變簬鏈変簡姝g‘鏍煎紡鐨刲icence錛屽墠闈㈡墽琛岀殑閮藉緢欏哄埄錛屼竴鐩村埌浜唖ub_10019E30,璺熻繘鍘諱竴鐪嬶紝涓鍒囦簡鐒朵簡: </p><p>浠g爜:</p><pre><span style="color: #0000ff">bool</span> __thiscall sub_10019E30(<span style="color: #0000ff">int</span> <span style="color: #0000ff">this</span>, <span style="color: #0000ff">int</span> a2, <span style="color: #0000ff">int</span> a3, <span style="color: #0000ff">int</span> a4) { <span style="color: #0000ff">int</span> v5; <span style="color: #008000">// esi@1</span> <span style="color: #0000ff">int</span> v6; <span style="color: #008000">// eax@1</span> <span style="color: #0000ff">int</span> v7; <span style="color: #008000">// eax@1</span> <span style="color: #0000ff">char</span> v8; <span style="color: #008000">// [sp+4h] [bp-10h]@1</span> v5 = <span style="color: #0000ff">this</span>; v6 = EVP_sha1(); EVP_DigestInit(&v8, v6); EVP_DigestUpdate(&v8, a2, a3); v7 = sub_1001A030(); <strong> <span style="color: #0000ff">return</span> EVP_VerifyFinal(&v8, v5, *(_DWORD *)(v5 + 4096), v7) == 1;</strong></pre><pre>}</pre> <p>鍓嶉潰涓瀹氶兘鏄姞瀵嗛獙璇佺殑錛屼絾鏄嚱鏁版渶鍚庢潵浜嗕竴鍙? </p><p>浠g爜:</p><pre><strong>EVP_VerifyFinal(&v8, v5, *(_DWORD *)(v5 + 4096), v7) == 1;</strong> </pre> <p>鍢垮樋錛岀湅鍚嶅瓧浼拌灝辨槸榪欎釜浜嗭紝鐪嬬湅榪欎釜鍑芥暟鐨勮繑鍥炲鹼紝1琛ㄧず鎴愬姛錛屽叾浠栬〃紺哄け璐ワ紝閭e氨鏄彧瑕佽姝ゅ嚱鏁版案榪滆繑鍥?錛屽氨澶у姛鍛婃垚浜嗭紝璇ュ埌姹囩紪浠g爜浜? </p><p>浠g爜:</p><pre>004066F0 /$ 83EC 10 sub esp, 10 ; 媯鏌ユ暟瀛楃鍚嶉儴鍒? 004066F3 |. 56 push esi 004066F4 |. 8BF1 mov esi, ecx 004066F6 |. E8 81270000 call <jmp.&LIBEAY32.#333> 004066FB |. 50 push eax 004066FC |. 8D4424 08 lea eax, dword ptr [esp+8] 00406700 |. 50 push eax 00406701 |. E8 70270000 call <jmp.&LIBEAY32.#268> 00406706 |. 8B4C24 24 mov ecx, dword ptr [esp+24] 0040670A |. 8B5424 20 mov edx, dword ptr [esp+20] 0040670E |. 51 push ecx 0040670F |. 52 push edx 00406710 |. 8D4424 14 lea eax, dword ptr [esp+14] 00406714 |. 50 push eax 00406715 |. E8 56270000 call <jmp.&LIBEAY32.#269> 0040671A |. 8B4C24 34 mov ecx, dword ptr [esp+34] 0040671E |. 83C4 14 add esp, 14 00406721 |. E8 2A100000 call 00407750 00406726 |. 8B8E 00100000 mov ecx, dword ptr [esi+1000] 0040672C |. 50 push eax 0040672D |. 51 push ecx 0040672E |. 8D5424 0C lea edx, dword ptr [esp+C] 00406732 |. 56 push esi 00406733 |. 52 push edx 00406734 |. E8 49270000 call <jmp.&LIBEAY32.#290> 00406739 |. 83C4 10 add esp, 10 0040673C |. 48 dec eax 0040673D |. F7D8 neg eax 0040673F 1BC0 sbb eax, eax <strong>00406741 90 inc eax</strong> 00406742 5E pop esi 00406743 83C4 10 add esp, 10 00406746 \. C2 0C00 retn 0C</pre> <p>涓鑸潵璁詫紝鍑芥暟榪斿洖鍊奸兘浼氱敤EAX,涓嶇涓変竷浜屽崄涓浜嗭紝鍏堝惂EAX鍋氫簡鍐嶈錛屾妸涓婇潰閭d釜榛戜綋鐨?br />inc eax 鏀規垚nop錛堝懙鍛碉紝nop鏄ぇ瀹剁殑鏈鐖?鏈哄櫒鐮佹槸90浜?榪欐槸鏀硅繃鐨勪簡) <br />淇濆瓨鍒版枃浠躲?br />澶у姛鍛婃垚鍝堬紒錛? </p><p>韜負鑿滈笩錛岃兘鍙栧緱榪欐牱鐨勭粨鏋滐紝鐪熸槸璁╀漢鍏村錛岃阿璋㈠悇浣嶉槄璇伙紝榪樿鍚勪綅楂樻墜涓嶅悵璧愭暀銆?br />涓嬭澆<a href="http://m.shnenglu.com/Files/jans2002/crack.zip">瀹夎紼嬪簭鍙婄牬瑙?/a></p><img src ="http://m.shnenglu.com/jans2002/aggbug/93354.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/jans2002/" target="_blank">jans2002</a> 2009-08-14 17:59 <a href="http://m.shnenglu.com/jans2002/archive/2009/08/14/93354.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>UnDName宸ュ叿錛屾樉紺哄嚱鏁頒慨楗板悕縐板伐鍏?/title><link>http://m.shnenglu.com/jans2002/archive/2009/08/14/93353.html</link><dc:creator>jans2002</dc:creator><author>jans2002</author><pubDate>Fri, 14 Aug 2009 09:51:00 GMT</pubDate><guid>http://m.shnenglu.com/jans2002/archive/2009/08/14/93353.html</guid><wfw:comment>http://m.shnenglu.com/jans2002/comments/93353.html</wfw:comment><comments>http://m.shnenglu.com/jans2002/archive/2009/08/14/93353.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.shnenglu.com/jans2002/comments/commentRss/93353.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/jans2002/services/trackbacks/93353.html</trackback:ping><description><![CDATA[<blockquote style="width: 79.16%; height: 578px"> <p>鍦ㄤ竴涓嬌鐢║NICODE鐨勫伐紼嬮噷浣跨敤log4cplus 1.0.3搴擄紝鍙戠幇鎬繪槸鍙戠敓閾炬帴閿欒銆傜寽鎯沖彲鑳芥槸log4cplus闇瑕佸湪UNICODE涓嬬紪璇戯紝鍩轟簬Debug鍜孯elease涓や釜澶嶅埗浜哢nicode Debug/Release閰嶇疆錛屽紑濮嬬紪璇戔?UniRelease寰堝鏄撻氳繃浜嗙紪璇戯紝浣嗘槸UniDebug鍗存繪槸鍙戠敓閾炬帴閿欒錛屼絾鏄嚱鏁拌偗瀹氬凡緇忓疄鐜頒簡錛屽皢閾炬帴閿欒鍙戠敓鐨勬枃浠禔ppender.obj鏂囦歡鎵撳紑錛岀劧鍚庢瘮杈冪紪璇戝櫒閲屾姤鍑虹殑淇℃伅</p> <p>涓涓槸</p> <p><a href="mailto:?error@OnlyOnceErrorHandler@log4cplus@@UAEXABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@Z">?error@OnlyOnceErrorHandler@log4cplus@@UAEXABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@Z</a> <p>鑰岄摼寮忓櫒鎵句笉鍒扮殑絎﹀彿鏄細</p> <p><a href="mailto:?error@OnlyOnceErrorHandler@log4cplus@@UAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z">?error@OnlyOnceErrorHandler@log4cplus@@UAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z</a> <p>榪欎袱涓鍙烽兘寰堟櫐娑╋紝寰堥毦璁╀漢鎼炴槑鐧戒粈涔堟剰鎬濓紝鏀劇嫍涓鎼滐紝榪樼湡鏈夊伐鍏峰彨undname.exe錛屽湪VC7.1閲岃嚜甯︼紝 <p>Undecoration of :- "?error@OnlyOnceErrorHandler@log4cplus@@UAEXABV?$basic_string<br>@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@Z"<br>is :- "public: virtual void __thiscall log4cplus::OnlyOnceErrorHandler::error(cl<br>ass std::basic_string<unsigned short,struct std::char_traits<unsigned short>,cla<br>ss std::allocator<unsigned short> > const &)" <p>Undecoration of :- "?error@OnlyOnceErrorHandler@log4cplus@@UAEXABV?$basic_string<br>@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z"<br>is :- "public: virtual void __thiscall log4cplus::OnlyOnceErrorHandler::error(cl<br>ass std::basic_string<char,struct std::char_traits<char>,class std::allocator<ch<br>ar> > const &)" <p>涓瀵規瘮錛屽氨鐭ラ亾鍙兘榪樻槸UNICODE鐨勫師鍥狅紝浠旂粏媯鏌++棰勫鐞嗙鍙瘋緗紝鍙戠幇濂藉閮借繕鏄疢CBS錛屼慨鏀癸紝閲嶆柊緙栬瘧錛岄棶棰樿В鍐熾? </blockquote><img src ="http://m.shnenglu.com/jans2002/aggbug/93353.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/jans2002/" target="_blank">jans2002</a> 2009-08-14 17:51 <a href="http://m.shnenglu.com/jans2002/archive/2009/08/14/93353.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>綆鍗曠殑makefile渚嬪瓙http://m.shnenglu.com/jans2002/archive/2009/04/05/78989.htmljans2002jans2002Sun, 05 Apr 2009 01:35:00 GMThttp://m.shnenglu.com/jans2002/archive/2009/04/05/78989.htmlhttp://m.shnenglu.com/jans2002/comments/78989.htmlhttp://m.shnenglu.com/jans2002/archive/2009/04/05/78989.html#Feedback0http://m.shnenglu.com/jans2002/comments/commentRss/78989.htmlhttp://m.shnenglu.com/jans2002/services/trackbacks/78989.htmlall   :   $(NAME).exe
$(NAME).obj:   $(NAME).cxx
    cl   $(NAME).cxx   /G7   /MD   /Ox   /Ot   /W3   /c   /EHsc   /I "D:\log4cplus-1.0.3\include"
$(NAME).exe:   $(NAME).obj
    link   $(NAME).obj    /out:$(NAME).exe /LIBPATH:"D:\log4cplus-1.0.3\msvc6\Debug"  /SUBSYSTEM:CONSOLE   /MACHINE:X86 log4cplusd.lib
clean:
    del *.obj
    del *.exe

jans2002 2009-04-05 09:35 鍙戣〃璇勮
]]>
瑙e紑 Windows 涓嬬殑涓寸晫鍖轟腑鐨勪唬鐮佹閿?/title><link>http://m.shnenglu.com/jans2002/archive/2009/02/20/74367.html</link><dc:creator>jans2002</dc:creator><author>jans2002</author><pubDate>Fri, 20 Feb 2009 02:03:00 GMT</pubDate><guid>http://m.shnenglu.com/jans2002/archive/2009/02/20/74367.html</guid><wfw:comment>http://m.shnenglu.com/jans2002/comments/74367.html</wfw:comment><comments>http://m.shnenglu.com/jans2002/archive/2009/02/20/74367.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.shnenglu.com/jans2002/comments/commentRss/74367.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/jans2002/services/trackbacks/74367.html</trackback:ping><description><![CDATA[<h3>瑙e紑 Windows 涓嬬殑涓寸晫鍖轟腑鐨勪唬鐮佹閿?/h3> <p><a >Matt Pietrek</a>鍜?<a >Russ Osterlund</a> <p>鏈枃鍋囧畾鎮ㄧ啛鎮?Win32銆丆++ 鍜屽綰跨▼澶勭悊銆?<p>涓嬭澆鏈枃鐨勪唬鐮侊細<a >CriticalSections.exe</a> (415KB) <p><strong>鎽樿</strong><strong></strong> <p>涓寸晫鍖烘槸涓縐嶉槻姝㈠涓嚎紼嬪悓鏃舵墽琛屼竴涓壒瀹氫唬鐮佽妭鐨勬満鍒訛紝榪欎竴涓婚騫舵病鏈夊紩璧峰お澶氬叧娉紝鍥犺屼漢浠湭鑳藉鍏舵繁鍒葷悊瑙c傚湪闇瑕佽窡韙唬鐮佷腑鐨勫綰跨▼澶勭悊鐨勬ц兘鏃訛紝瀵?Windows 涓復鐣屽尯鐨勬繁鍒葷悊瑙i潪甯告湁鐢ㄣ?鏈枃娣卞叆鐮旂┒涓寸晫鍖虹殑鍘熺悊錛屼互鎻ず鍦ㄦ煡鎵炬閿佸拰紜鎬ц兘闂榪囩▼涓殑鏈夌敤淇℃伅銆傚畠榪樺寘鍚竴涓究鍒╃殑瀹炵敤宸ュ叿紼嬪簭錛屽彲浠ユ樉紺烘墍鏈変復鐣屽尯鍙婂叾褰撳墠鐘舵併?<p>鍦ㄦ垜浠澶氬勾鐨勭紪紼嬪疄璺典腑錛屽浜?Win32廬 涓寸晫鍖烘病鏈夊彈鍒伴潪甯稿鐨勨渦nder the hood鈥濆叧娉ㄨ屾劅鍒伴潪甯稿鎬傚綋鐒訛紝鎮ㄥ彲鑳戒簡瑙f湁鍏充復鐣屽尯鍒濆鍖栦笌浣跨敤鐨勫熀紜鐭ヨ瘑錛屼絾鎮ㄦ槸鍚︽浘緇忚姳璐規椂闂存潵娣卞叆鐮旂┒ WINNT.H 涓墍瀹氫箟鐨?CRITICAL_SECTION 緇撴瀯鍛紵鍦ㄨ繖涓緇撴瀯涓湁涓浜涢潪甯告湁鎰忎箟鐨勫ソ涓滆タ琚暱鏈熷拷鐣ャ傛垜浠皢瀵規榪涜琛ュ厖錛屽茍鍚戞偍浠嬬粛涓浜涘緢鏈夋剰涔夌殑鎶宸э紝榪欎簺鎶宸у浜庤窡韙偅浜涢毦浠ュ療瑙夌殑澶氱嚎紼嬪鐞嗛敊璇潪甯告湁鐢ㄣ傛洿閲嶈鐨勬槸錛屼嬌鐢ㄦ垜浠殑 MyCriticalSections 瀹炵敤宸ュ叿錛屽彲浠ユ槑鐧藉浣曞 CRITICAL_SECTION 榪涜寰皬鍦版墿灞曪紝浠ユ彁渚涢潪甯告湁鐢ㄧ殑鐗規э紝榪欎簺鐗規у彲鐢ㄤ簬璋冭瘯鍜屾ц兘璋冩暣錛堣涓嬭澆瀹屾暣浠g爜錛屽弬瑙佹湰鏂囬《閮ㄧ殑閾炬帴錛夈?<p>鑰佸疄璇達紝浣滆呬滑緇忓父蹇界暐 CRITICAL_SECTION 緇撴瀯鐨勯儴鍒嗗師鍥犲湪浜庡畠鍦ㄤ互涓嬩袱涓富瑕?Win32 浠g爜搴撲腑鐨勫疄鐜版湁寰堝ぇ涓嶅悓錛歁icrosoft廬 Windows廬 95 鍜?Windows NT廬銆備漢浠煡閬撹繖涓ょ浠g爜搴撻兘宸茬粡鍙戝睍鍑哄ぇ閲忓悗緇増鏈紙鍏舵渶鏂扮増鏈垎鍒負 Windows Me 鍜?Windows XP錛夛紝浣嗘病鏈夊繀瑕佸湪姝ゅ灝嗗叾涓涓鍒楀嚭銆傚叧閿湪浜?Windows XP 鐜板湪宸茬粡鍙戝睍寰楅潪甯稿畬鍠勶紝寮鍙戝晢鍙兘寰堝揩灝變細鍋滄瀵?Windows 95 緋誨垪鎿嶄綔緋葷粺鐨勬敮鎸併傛垜浠湪鏈枃涓氨鏄繖涔堝仛鐨勩?<p>璇氱劧錛屽綋浠婃渶鍙楀叧娉ㄧ殑鏄?Microsoft .NET Framework錛屼絾鏄壇濂界殑鏃у紡 Win32 緙栫▼涓嶄細寰堝揩娑堝け銆傚鏋滄偍鎷ユ湁閲囩敤浜嗕復鐣屽尯鐨勭幇鏈?Win32 浠g爜錛屾偍浼氬彂鐜版垜浠殑宸ュ叿浠ュ強瀵逛復鐣屽尯鐨勮鏄庨兘闈炲父鏈夌敤銆備絾鏄娉ㄦ剰錛屾垜浠彧璁ㄨ Windows NT 鍙婂叾鍚庣畫鐗堟湰錛岃屾病鏈夋秹鍙婁笌 .NET 鐩稿叧鐨勪換浣曞唴瀹癸紝榪欎竴鐐歸潪甯擱噸瑕併?<p>涓寸晫鍖猴細綆榪?<p>濡傛灉鎮ㄩ潪甯哥啛鎮変復鐣屽尯錛屽茍鍙互涓嶅亣鎬濈儲鍦拌繘琛屽簲鐢紝閭e氨鍙互鐣ヨ繃鏈妭銆傚惁鍒欙紝璇峰悜涓嬮槄璇伙紝浠ュ榪欎簺鍐呭榪涜蹇熷洖欏俱傚鏋滄偍涓嶇啛鎮夎繖浜涘熀紜鍐呭錛屽垯鏈妭涔嬪悗鐨勫唴瀹瑰氨娌℃湁澶ぇ鎰忎箟銆?<p>涓寸晫鍖烘槸涓縐嶈交閲忕駭鏈哄埗錛屽湪鏌愪竴鏃墮棿鍐呭彧鍏佽涓涓嚎紼嬫墽琛屾煇涓粰瀹氫唬鐮佹銆傞氬父鍦ㄤ慨鏀瑰叏灞鏁版嵁錛堝闆嗗悎綾伙級鏃朵細浣跨敤涓寸晫鍖恒備簨浠躲佸鐢ㄦ埛緇堢鎵ц紼嬪簭鍜屼俊鍙烽噺涔熺敤浜庡綰跨▼鍚屾錛屼絾涓寸晫鍖轟笌瀹冧滑涓嶅悓錛屽畠騫朵笉鎬繪槸鎵ц鍚戝唴鏍告ā寮忕殑鎺у埗杞崲錛岃繖涓杞崲鎴愭湰鏄傝吹銆傜◢鍚庡皢浼氱湅鍒幫紝瑕佽幏寰椾竴涓湭鍗犵敤涓寸晫鍖猴紝浜嬪疄涓婂彧闇瑕佸鍐呭瓨鍋氬嚭寰堝皯鐨勪慨鏀癸紝鍏墮熷害闈炲父蹇傚彧鏈夊湪灝濊瘯鑾峰緱宸插崰鐢ㄤ復鐣屽尯鏃訛紝瀹冩墠浼氳煩鑷沖唴鏍告ā寮忋傝繖涓杞婚噺綰х壒鎬х殑緙虹偣鍦ㄤ簬涓寸晫鍖哄彧鑳界敤浜庡鍚屼竴榪涚▼鍐呯殑綰跨▼榪涜鍚屾銆?<p>涓寸晫鍖虹敱 WINNT.H 涓墍瀹氫箟鐨?RTL_CRITICAL_SECTION 緇撴瀯琛ㄧず銆傚洜涓烘偍鐨?C++ 浠g爜閫氬父澹版槑涓涓?CRITICAL_SECTION 綾誨瀷鐨勫彉閲忥紝鎵浠ユ偍鍙兘瀵規騫朵笉浜嗚В銆傜爺絀?WINBASE.H 鍚庢偍浼氬彂鐜幫細 <pre>typedef RTL_CRITICAL_SECTION CRITICAL_SECTION; </pre> <p>鎴戜滑灝嗗湪鐭椂闂村唴鎻ず RTL_CRITICAL_SECTION 緇撴瀯鐨勫疄璐ㄣ傛鏃訛紝閲嶈闂鍦ㄤ簬 CRITICAL_SECTION錛堜篃縐頒綔 RTL_CRITICAL_SECTION錛夊彧鏄竴涓嫢鏈夋槗璁塊棶瀛楁鐨勭粨鏋勶紝榪欎簺瀛楁鍙互鐢?KERNEL32 API 鎿嶄綔銆? <p>鍦ㄥ皢涓寸晫鍖轟紶閫掔粰 InitializeCriticalSection 鏃訛紙鎴栬呮洿鍑嗙‘鍦拌錛屾槸鍦ㄤ紶閫掑叾鍦板潃鏃訛級錛屼復鐣屽尯鍗沖紑濮嬪瓨鍦ㄣ傚垵濮嬪寲涔嬪悗錛屼唬鐮佸嵆灝嗕復鐣屽尯浼犻掔粰 EnterCriticalSection 鍜?LeaveCriticalSection API銆備竴涓嚎紼嬭嚜 EnterCriticalSection 涓繑鍥炲悗錛屾墍鏈夊叾浠栬皟鐢?EnterCriticalSection 鐨勭嚎紼嬮兘灝嗚闃繪錛岀洿鍒扮涓涓嚎紼嬭皟鐢?LeaveCriticalSection 涓烘銆傛渶鍚庯紝褰撲笉鍐嶉渶瑕佽涓寸晫鍖烘椂錛屼竴縐嶈壇濂界殑緙栫爜涔犳儻鏄皢鍏朵紶閫掔粰 DeleteCriticalSection銆? <p>鍦ㄤ復鐣屽尯鏈浣跨敤鐨勭悊鎯蟲儏鍐典腑錛屽 EnterCriticalSection 鐨勮皟鐢ㄩ潪甯稿揩閫燂紝鍥犱負瀹冨彧鏄鍙栧拰淇敼鐢ㄦ埛妯″紡鍐呭瓨涓殑鍐呭瓨浣嶇疆銆傚惁鍒欙紙鍦ㄥ悗鏂囧皢浼氶亣鍒頒竴縐嶄緥澶栨儏鍐碉級錛岄樆姝簬涓寸晫鍖虹殑綰跨▼鏈夋晥鍦板畬鎴愯繖涓宸ヤ綔錛岃屼笉闇瑕佹秷鑰楅澶栫殑 CPU 鍛ㄦ湡銆傛墍闃繪鐨勭嚎紼嬩互鍐呮牳妯″紡絳夊緟錛屽湪璇ヤ復鐣屽尯鐨勬墍鏈夎呭皢鍏墮噴鏀句箣鍓嶏紝涓嶈兘瀵硅繖浜涚嚎紼嬭繘琛岃皟搴︺傚鏋滄湁澶氫釜綰跨▼琚樆姝簬涓涓復鐣屽尯涓紝褰撳彟涓綰跨▼閲婃斁璇ヤ復鐣屽尯鏃訛紝鍙湁涓涓嚎紼嬭幏寰楄涓寸晫鍖恒? <p>娣卞叆鐮旂┒錛歊TL_CRITICAL_SECTION 緇撴瀯 <p>鍗充嬌鎮ㄥ凡緇忓湪鏃ュ父宸ヤ綔涓嬌鐢ㄨ繃涓寸晫鍖猴紝鎮ㄤ篃闈炲父鍙兘騫舵病鏈夌湡姝d簡瑙h秴鍑烘枃妗d箣澶栫殑鍐呭銆備簨瀹炰笂瀛樺湪鐫寰堝闈炲父瀹規槗鎺屾彙鐨勫唴瀹廣備緥濡傦紝浜轟滑寰堝皯鐭ラ亾涓涓繘紼嬬殑涓寸晫鍖烘槸淇濆瓨浜庝竴涓摼琛ㄤ腑錛屽茍涓斿彲浠ュ鍏惰繘琛屾灇涓俱傚疄闄呬笂錛學INDBG 鏀寔 !locks 鍛戒護錛岃繖涓鍛戒護鍙互鍒楀嚭鐩爣榪涚▼涓殑鎵鏈変復鐣屽尯銆傛垜浠◢鍚庡皢瑕佽皥鍒扮殑瀹炵敤宸ュ叿涔熷簲鐢ㄤ簡涓寸晫鍖鴻繖涓椴滀負浜虹煡鐨勭壒寰併備負浜嗙湡姝g悊瑙h繖涓瀹炵敤宸ュ叿濡備綍宸ヤ綔錛屾湁蹇呰鐪熸鎺屾彙涓寸晫鍖虹殑鍐呴儴緇撴瀯銆傝鐫榪欎竴鐐癸紝鐜板湪寮濮嬬爺絀?RTL_CRITICAL_SECTION 緇撴瀯銆備負鏂逛究璧瘋錛屽皢姝ょ粨鏋勫垪鍑哄涓嬶細 <pre>struct RTL_CRITICAL_SECTION { PRTL_CRITICAL_SECTION_DEBUG DebugInfo; LONG LockCount; LONG RecursionCount; HANDLE OwningThread; HANDLE LockSemaphore; ULONG_PTR SpinCount; }; </pre> <p>浠ヤ笅鍚勬瀵規瘡涓瓧孌佃繘琛岃鏄庛? <p><strong>DebugInfo</strong> 姝ゅ瓧孌靛寘鍚竴涓寚閽堬紝鎸囧悜緋葷粺鍒嗛厤鐨勪即闅忕粨鏋勶紝璇ョ粨鏋勭殑綾誨瀷涓?RTL_CRITICAL_SECTION_DEBUG銆傝繖涓緇撴瀯涓寘鍚洿澶氭瀬鏈変環鍊肩殑淇℃伅錛屼篃瀹氫箟浜?WINNT.H 涓傛垜浠◢鍚庡皢瀵瑰叾榪涜鏇存繁鍏ュ湴鐮旂┒銆? <p><strong>LockCount</strong> 榪欐槸涓寸晫鍖轟腑鏈閲嶈鐨勪竴涓瓧孌點傚畠琚垵濮嬪寲涓烘暟鍊?-1錛涙鏁板肩瓑浜庢垨澶т簬 0 鏃訛紝琛ㄧず姝や復鐣屽尯琚崰鐢ㄣ傚綋鍏朵笉絳変簬 -1 鏃訛紝OwningThread 瀛楁錛堟瀛楁琚敊璇湴瀹氫箟浜?WINNT.H 涓?鈥?搴斿綋鏄?DWORD 鑰屼笉鏄?HANDLE錛夊寘鍚簡鎷ユ湁姝や復鐣屽尯鐨勭嚎紼?ID銆傛瀛楁涓?(RecursionCount -1) 鏁板間箣闂寸殑宸艱〃紺烘湁澶氬皯涓叾浠栫嚎紼嬪湪絳夊緟鑾峰緱璇ヤ復鐣屽尯銆? <p><strong>RecursionCount</strong> 姝ゅ瓧孌靛寘鍚墍鏈夎呯嚎紼嬪凡緇忚幏寰楄涓寸晫鍖虹殑嬈℃暟銆傚鏋滆鏁板間負闆訛紝涓嬩竴涓皾璇曡幏鍙栬涓寸晫鍖虹殑綰跨▼灝嗕細鎴愬姛銆? <p><strong>OwningThread</strong> 姝ゅ瓧孌靛寘鍚綋鍓嶅崰鐢ㄦ涓寸晫鍖虹殑綰跨▼鐨勭嚎紼嬫爣璇嗙銆傛綰跨▼ ID 涓?GetCurrentThreadId 涔嬬被鐨?API 鎵榪斿洖鐨?ID 鐩稿悓銆? <p><strong>LockSemaphore</strong> 姝ゅ瓧孌電殑鍛藉悕涓嶆伆褰擄紝瀹冨疄闄呬笂鏄竴涓嚜澶嶄綅浜嬩歡錛岃屼笉鏄竴涓俊鍙楓傚畠鏄竴涓唴鏍稿璞″彞鏌勶紝鐢ㄤ簬閫氱煡鎿嶄綔緋葷粺錛氳涓寸晫鍖虹幇鍦ㄧ┖闂層傛搷浣滅郴緇熷湪涓涓嚎紼嬬涓嬈″皾璇曡幏寰楄涓寸晫鍖猴紝浣嗚鍙︿竴涓凡緇忔嫢鏈夎涓寸晫鍖虹殑綰跨▼鎵闃繪鏃訛紝鑷姩鍒涘緩榪欐牱涓涓彞鏌勩傚簲褰撹皟鐢?DeleteCriticalSection錛堝畠灝嗗彂鍑轟竴涓皟鐢ㄨ浜嬩歡鐨?CloseHandle 璋冪敤錛屽茍鍦ㄥ繀瑕佹椂閲婃斁璇ヨ皟璇曠粨鏋勶級錛屽惁鍒欏皢浼氬彂鐢熻祫婧愭硠婕忋? <p><strong>SpinCount</strong> 浠呯敤浜庡澶勭悊鍣ㄧ郴緇熴侻SDN廬 鏂囨。瀵規瀛楁榪涜濡備笅璇存槑錛氣滃湪澶氬鐞嗗櫒緋葷粺涓紝濡傛灉璇ヤ復鐣屽尯涓嶅彲鐢紝璋冪敤綰跨▼灝嗗湪瀵逛笌璇ヤ復鐣屽尯鐩稿叧鐨勪俊鍙鋒墽琛岀瓑寰呮搷浣滀箣鍓嶏紝鏃嬭漿 dwSpinCount 嬈°傚鏋滆涓寸晫鍖哄湪鏃嬭漿鎿嶄綔鏈熼棿鍙樹負鍙敤錛岃璋冪敤綰跨▼灝遍伩鍏嶄簡絳夊緟鎿嶄綔銆傗濇棆杞鏁板彲浠ュ湪澶氬鐞嗗櫒璁$畻鏈轟笂鎻愪緵鏇翠匠鎬ц兘錛屽叾鍘熷洜鍦ㄤ簬鍦ㄤ竴涓驚鐜腑鏃嬭漿閫氬父瑕佸揩浜庤繘鍏ュ唴鏍告ā寮忕瓑寰呯姸鎬併傛瀛楁榛樿鍊間負闆訛紝浣嗗彲浠ョ敤 InitializeCriticalSectionAndSpinCount API 灝嗗叾璁劇疆涓轟竴涓笉鍚屽箋? <p>RTL_CRITICAL_SECTION_DEBUG 緇撴瀯 <p>鍓嶉潰鎴戜滑娉ㄦ剰鍒幫紝鍦?RTL_CRITICAL_SECTION 緇撴瀯鍐咃紝DebugInfo 瀛楁鎸囧悜涓涓?RTL_CRITICAL_SECTION_DEBUG 緇撴瀯錛岃緇撴瀯緇欏嚭濡備笅錛?<pre>struct _RTL_CRITICAL_SECTION_DEBUG { WORD Type; WORD CreatorBackTraceIndex; RTL_CRITICAL_SECTION *CriticalSection; LIST_ENTRY ProcessLocksList; DWORD EntryCount; DWORD ContentionCount; DWORD Spare[ 2 ]; } </pre> <p>榪欎竴緇撴瀯鐢?InitializeCriticalSection 鍒嗛厤鍜屽垵濮嬪寲銆傚畠鏃㈠彲浠ョ敱 NTDLL 鍐呯殑棰勫垎閰嶆暟緇勫垎閰嶏紝涔熷彲浠ョ敱榪涚▼鍫嗗垎閰嶃俁TL_CRITICAL_SECTION 鐨勮繖涓浼撮殢緇撴瀯鍖呭惈涓緇勫尮閰嶅瓧孌碉紝鍏鋒湁榪ョ劧涓嶅悓鐨勮鑹詫細鏈変袱涓毦浠ョ悊瑙o紝闅忓悗涓や釜鎻愪緵浜嗙悊瑙h繖涓涓寸晫鍖洪摼緇撴瀯鐨勫叧閿紝涓や釜鏄噸澶嶈緗殑錛屾渶鍚庝袱涓湭浣跨敤銆? <p>涓嬮潰鏄 RTL_CRITICAL_SECTION 瀛楁鐨勮鏄庛? <p><strong>Type</strong> 姝ゅ瓧孌墊湭浣跨敤錛岃鍒濆鍖栦負鏁板?0銆? <p><strong>CreatorBackTraceIndex</strong> 姝ゅ瓧孌典粎鐢ㄤ簬璇婃柇鎯呭艦涓傚湪娉ㄥ唽琛ㄩ」 HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\YourProgram 涔嬩笅鏄?keyfield銆丟lobalFlag 鍜?StackTraceDatabaseSizeInMb 鍊箋傛敞鎰忥紝鍙湁鍦ㄨ繍琛岀◢鍚庤鏄庣殑 Gflags 鍛戒護鏃舵墠浼氭樉紺鴻繖浜涘箋傝繖浜涙敞鍐岃〃鍊肩殑璁劇疆姝g‘鏃訛紝CreatorBackTraceIndex 瀛楁灝嗙敱鍫嗘爤璺熻釜涓墍鐢ㄧ殑涓涓儲寮曞煎~鍏呫傚湪 <a >MSDN</a> 涓悳绱?GFlags 鏂囨。涓殑鐭鈥渃reate user mode stack trace database鈥濆拰鈥渆nlarging the user-mode stack trace database鈥濓紝鍙互鎵懼埌鏈夊叧榪欎竴鍐呭鐨勬洿澶氫俊鎭? <p><strong>CriticalSection</strong> 鎸囧悜涓庢緇撴瀯鐩稿叧鐨?RTL_CRITICAL_SECTION銆?strong>鍥?1</strong> 璇存槑璇ュ熀紜緇撴瀯浠ュ強 RTL_CRITICAL_SECTION銆丷TL_CRITICAL_SECTION_DEBUG 鍜屼簨浠墮摼涓叾浠栧弬涓庤呬箣闂寸殑鍏崇郴銆? <p><img height="378" alt="fig01" src="http://www.microsoft.com/china/MSDN/library/enterprisedevelopment/softwaredev/art/Deadlockfig01.gif" width="271" border="0"> <p><strong>鍥?1 涓寸晫鍖哄鐞嗘祦紼?/strong> <p><strong>ProcessLocksList</strong> LIST_ENTRY 鏄敤浜庤〃紺哄弻鍚戦摼琛ㄤ腑鑺傜偣鐨勬爣鍑?Windows 鏁版嵁緇撴瀯銆俁TL_CRITICAL_SECTION_DEBUG 鍖呭惈浜嗛摼琛ㄧ殑涓閮ㄥ垎錛屽厑璁稿悜鍓嶅拰鍚戝悗閬嶅巻璇ヤ復鐣屽尯銆傛湰鏂囧悗闈㈢粰鍑虹殑瀹炵敤宸ュ叿璇存槑濡備綍浣跨敤 Flink錛堝墠鍚戦摼鎺ワ級鍜?Blink錛堝悗鍚戦摼鎺ワ級瀛楁鍦ㄩ摼琛ㄤ腑鐨勬垚鍛樹箣闂寸Щ鍔ㄣ備換浣曚粠浜嬭繃璁懼椹卞姩紼嬪簭鎴栬呯爺絀惰繃 Windows 鍐呮牳鐨勪漢閮戒細闈炲父鐔熸倝榪欎竴鏁版嵁緇撴瀯銆? <p><strong>EntryCount/ContentionCount</strong> 榪欎簺瀛楁鍦ㄧ浉鍚岀殑鏃墮棿銆佸嚭浜庣浉鍚岀殑鍘熷洜琚掑銆傝繖鏄偅浜涘洜涓轟笉鑳介┈涓婅幏寰椾復鐣屽尯鑰岃繘鍏ョ瓑寰呯姸鎬佺殑綰跨▼鐨勬暟鐩備笌 LockCount 鍜?RecursionCount 瀛楁涓嶅悓錛岃繖浜涘瓧孌墊案榪滈兘涓嶄細閫掑噺銆? <p><strong>Spares</strong> 榪欎袱涓瓧孌墊湭浣跨敤錛岀敋鑷蟲湭琚垵濮嬪寲錛堝敖綆″湪鍒犻櫎涓寸晫鍖虹粨鏋勬椂灝嗚繖浜涘瓧孌佃繘琛屼簡娓呴浂錛夈傚悗闈㈠皢浼氳鏄庯紝鍙互鐢ㄨ繖浜涙湭琚嬌鐢ㄧ殑瀛楁鏉ヤ繚瀛樻湁鐢ㄧ殑璇婃柇鍊箋? <p>鍗充嬌 RTL_CRITICAL_SECTION_DEBUG 涓寘鍚涓瓧孌碉紝瀹冧篃鏄父瑙勪復鐣屽尯緇撴瀯鐨勫繀瑕佹垚鍒嗐備簨瀹炰笂錛屽鏋滅郴緇熸伆宸т笉鑳界敱榪涚▼鍫嗕腑鑾峰緱榪欎竴緇撴瀯鐨勫瓨鍌ㄥ尯錛孖nitializeCriticalSection 灝嗚繑鍥炰負 STATUS_NO_MEMORY 鐨?LastError 緇撴灉錛岀劧鍚庤繑鍥炲浜庝笉瀹屾暣鐘舵佺殑涓寸晫鍖虹粨鏋勩? <p>涓寸晫鍖虹姸鎬? <p>褰撶▼搴忔墽琛屻佽繘鍏ヤ笌紱誨紑涓寸晫鍖烘椂錛孯TL_CRITICAL_SECTION 鍜?RTL_CRITICAL_SECTION_DEBUG 緇撴瀯涓殑瀛楁浼氭牴鎹復鐣屽尯鎵澶勭殑鐘舵佸彉鍖栥傝繖浜涘瓧孌電敱涓寸晫鍖?API 涓殑綈胯浠g爜鏇存柊錛屽湪鍚庨潰灝嗕細鐪嬪埌榪欎竴鐐廣傚鏋滅▼搴忎負澶氱嚎紼嬶紝騫朵笖鍏剁嚎紼嬭闂槸鐢變復鐣屽尯淇濇姢鐨勫叕鐢ㄨ祫婧愶紝鍒欒繖浜涚姸鎬佸氨鏇存湁鎰忎箟銆? <p>浣嗘槸錛屼笉綆′唬鐮佺殑綰跨▼浣跨敤鎯呭喌濡備綍錛屾湁涓ょ鐘舵侀兘浼氬嚭鐜般傜涓縐嶆儏鍐碉紝濡傛灉 LockCount 瀛楁鏈変竴涓笉絳変簬 -1 鐨勬暟鍊鹼紝姝や復鐣屽尯琚崰鐢紝OwningThread 瀛楁鍖呭惈鎷ユ湁璇ヤ復鐣屽尯鐨勭嚎紼嬬殑綰跨▼鏍囪瘑絎︺傚湪澶氱嚎紼嬬▼搴忎腑錛孡ockCount 涓?RecursionCount 鑱斿悎琛ㄦ槑褰撳墠鏈夊灝戠嚎紼嬭闃繪浜庤涓寸晫鍖恒傜浜岀鎯呭喌錛屽鏋?RecursionCount 鏄竴涓ぇ浜?1 鐨勬暟鍊鹼紝鍏跺憡鐭ユ偍鎵鏈夎呯嚎紼嬪凡緇忛噸鏂拌幏寰楄涓寸晫鍖哄灝戞錛堜篃璁鎬笉蹇呰錛夛紝璇ヤ復鐣屽尯鏃㈠彲浠ラ氳繃璋冪敤 EnterCriticalSection銆佷篃鍙互閫氳繃璋冪敤 TryEnterCriticalSection 鑾峰緱銆傚ぇ浜?1 鐨勪換浣曟暟鍊奸兘琛ㄧず浠g爜鐨勬晥鐜囧彲鑳借緝浣庢垨鑰呭彲鑳藉湪浠ュ悗鍙戠敓閿欒銆備緥濡傦紝璁塊棶鍏叡璧勬簮鐨勪換浣?C++ 綾繪柟娉曞彲鑳戒細涓嶅繀瑕佸湴閲嶆柊榪涘叆璇ヤ復鐣屽尯銆? <p>娉ㄦ剰錛屽湪澶у鏁版椂闂撮噷錛孡ockCount 涓?RecursionCount 瀛楁涓垎鍒寘鍚叾鍒濆鍊?-1 鍜?0錛岃繖涓鐐歸潪甯擱噸瑕併備簨瀹炰笂錛屽浜庡崟綰跨▼紼嬪簭錛屼笉鑳戒粎閫氳繃媯鏌ヨ繖浜涘瓧孌墊潵鍒ゆ柇鏄惁鏇捐幏寰楄繃涓寸晫鍖恒備絾鏄紝澶氱嚎紼嬬▼搴忕暀涓嬩簡涓浜涙爣璁幫紝鍙互鐢ㄦ潵鍒ゆ柇鏄惁鏈変袱涓垨澶氫釜綰跨▼璇曞浘鍚屾椂鎷ユ湁鍚屼竴涓寸晫鍖恒? <p>鎮ㄥ彲浠ユ壘鍒扮殑鏍囪涔嬩竴鏄嵆浣垮湪璇ヤ復鐣屽尯鏈鍗犵敤鏃?LockSemaphore 瀛楁涓粛鍖呭惈涓涓潪闆跺箋傝繖琛ㄧず錛氬湪鏌愪竴鏃墮棿錛屾涓寸晫鍖洪樆姝簡涓涓垨澶氫釜綰跨▼ 鈥?浜嬩歡鍙ユ焺鐢ㄤ簬閫氱煡璇ヤ復鐣屽尯宸茶閲婃斁錛岀瓑寰呰涓寸晫鍖虹殑綰跨▼涔嬩竴鐜板湪鍙互鑾峰緱璇ヤ復鐣屽尯騫剁戶緇墽琛屻傚洜涓?OS 鍦ㄤ復鐣屽尯闃繪鍙︿竴涓嚎紼嬫椂鑷姩鍒嗛厤浜嬩歡鍙ユ焺錛屾墍浠ュ鏋滄偍鍦ㄤ笉鍐嶉渶瑕佷復鐣屽尯鏃跺繕璁板皢鍏跺垹闄わ紝LockSemaphore 瀛楁鍙兘浼氬鑷寸▼搴忎腑鍙戠敓璧勬簮娉勬紡銆? <p>鍦ㄥ綰跨▼紼嬪簭涓彲鑳介亣鍒扮殑鍙︿竴鐘舵佹槸 EntryCount 鍜?ContentionCount 瀛楁鍖呭惈涓涓ぇ浜庨浂鐨勬暟鍊箋傝繖涓や釜瀛楁淇濆瓨鏈変復鐣屽尯瀵逛竴涓嚎紼嬭繘琛岄樆姝㈢殑嬈℃暟銆傚湪姣忔鍙戠敓榪欎竴浜嬩歡鏃訛紝榪欎袱涓瓧孌佃閫掑錛屼絾鍦ㄤ復鐣屽尯瀛樺湪鏈熼棿涓嶄細琚掑噺銆傝繖浜涘瓧孌靛彲鐢ㄤ簬闂存帴紜畾紼嬪簭鐨勬墽琛岃礬寰勫拰鐗規с備緥濡傦紝EntryCount 闈炲父楂樻椂鍒欐剰鍛崇潃璇ヤ復鐣屽尯緇忓巻鐫澶ч噺浜夌敤錛屽彲鑳戒細鎴愪負浠g爜鎵ц榪囩▼涓殑涓涓綔鍦ㄧ摱棰堛? <p>鍦ㄧ爺絀朵竴涓閿佺▼搴忔椂錛岃繕浼氬彂鐜頒竴縐嶄技涔庢棤娉曡繘琛岄昏緫瑙i噴鐨勭姸鎬併備竴涓嬌鐢ㄩ潪甯擱綣佺殑涓寸晫鍖虹殑 LockCount 瀛楁涓寘鍚竴涓ぇ浜?-1 鐨勬暟鍊鹼紝涔熷氨鏄瀹冭綰跨▼鎵鎷ユ湁錛屼絾鏄?OwningThread 瀛楁涓洪浂錛堣繖鏍峰氨鏃犳硶鎵懼嚭鏄摢涓嚎紼嬪鑷撮棶棰橈級銆傛祴璇曠▼搴忔槸澶氱嚎紼嬬殑錛屽湪鍗曞鐞嗗櫒璁$畻鏈哄拰澶氬鐞嗗櫒璁$畻鏈轟腑閮戒細鍑虹幇榪欑鎯呭喌銆傚敖綆?LockCount 鍜屽叾浠栧煎湪姣忔榪愯涓兘涓嶅悓錛屼絾姝ょ▼搴忔繪槸姝婚攣浜庡悓涓涓寸晫鍖恒傛垜浠潪甯稿笇鏈涚煡閬撴槸鍚︽湁浠諱綍鍏朵粬寮鍙戜漢鍛樹篃閬囧埌浜嗗鑷磋繖涓鐘舵佺殑 API 璋冪敤搴忓垪銆? <p>鏋勫緩涓涓洿濂界殑鎹曢紶鍣? <p>鍦ㄦ垜浠涔犱復鐣屽尯鐨勫伐浣滄柟寮忔椂錛岄潪甯稿伓鐒跺湴寰楀埌涓浜涢噸瑕佸彂鐜幫紝鍒╃敤榪欎簺鍙戠幇鍙互寰楀埌涓涓潪甯稿ソ鐨勫疄鐢ㄥ伐鍏楓傜涓涓彂鐜版槸 ProcessLocksList LIST_ENTRY 瀛楁鐨勫嚭鐜幫紝榪欎嬌鎴戜滑鎯沖埌榪涚▼鐨勪復鐣屽尯鍙兘鏄彲鏋氫婦鐨勩傚彟涓涓噸澶у彂鐜版槸鎴戜滑鐭ラ亾浜嗗浣曟壘鍑轟復鐣屽尯鍒楄〃鐨勫ご銆傝繕鏈変竴涓噸瑕佸彂鐜版槸鍙互鍦ㄦ病鏈変換浣曟崯澶辯殑鎯呭喌涓嬪啓 RTL_CRITICAL_SECTION 鐨?Spare 瀛楁錛堣嚦灝戝湪鎴戜滑鐨勬墍鏈夋祴璇曚腑濡傛錛夈傛垜浠繕鍙戠幇鍙互寰堝鏄撳湴閲嶅啓緋葷粺鐨勪竴浜涗復鐣屽尯渚嬬▼錛岃屼笉闇瑕佸婧愭枃浠惰繘琛屼換浣曚慨鏀廣? <p>鏈鍒濓紝鎴戜滑鐢變竴涓畝鍗曠殑紼嬪簭寮濮嬶紝鍏舵鏌ヤ竴涓繘紼嬩腑鐨勬墍鏈変復鐣屽尯錛屽茍鍒楀嚭鍏跺綋鍓嶇姸鎬侊紝浠ユ煡鐪嬫槸鍚︽嫢鏈夎繖浜涗復鐣屽尯銆傚鏋滄嫢鏈夛紝鍒欐壘鍑虹敱鍝釜綰跨▼鎷ユ湁錛屼互鍙婅涓寸晫鍖洪樆姝簡澶氬皯涓嚎紼嬶紵榪欑鍋氭硶瀵逛簬 OS 鐨勭媯鐑呬滑姣旇緝閫傚悎錛屼絾瀵逛簬鍙槸甯屾湜鏈夊姪浜庣悊瑙e叾紼嬪簭鐨勫吀鍨嬬殑紼嬪簭鍛樺氨涓嶆槸闈炲父鏈夌敤浜嗐? <p>鍗充嬌鏄湪鏈綆鍗曠殑鎺у埗鍙版ā寮忊淗ello World鈥濈▼搴忎腑涔熷瓨鍦ㄨ澶氫復鐣屽尯銆傚叾涓ぇ閮ㄥ垎鏄敱 USER32 鎴?GDI32 涔嬬被鐨勭郴緇?DLL 鍒涘緩錛岃岃繖浜?DLL 寰堝皯浼氬鑷存閿佹垨鎬ц兘闂銆傛垜浠笇鏈涙湁涓縐嶆柟娉曡兘婊ら櫎榪欎簺涓寸晫鍖猴紝鑰屽彧鐣欎笅浠g爜涓墍鍏沖績鐨勯偅浜涗復鐣屽尯銆俁TL_CRITICAL_SECTION_DEBUG 緇撴瀯涓殑 Spare 瀛楁鍙互寰堝ソ鍦板畬鎴愯繖涓宸ヤ綔銆傚彲浠ヤ嬌鐢ㄥ叾涓殑涓涓垨涓や釜鏉ユ寚紺猴細榪欎簺涓寸晫鍖烘槸鏉ヨ嚜鐢ㄦ埛緙栧啓鐨勪唬鐮侊紝鑰屼笉鏄潵鑷?OS銆? <p>浜庢槸錛屼笅涓涓昏緫闂灝卞彉涓哄浣曠‘瀹氬摢浜涗復鐣屽尯鏄潵鑷偍緙栧啓鐨勪唬鐮併傛湁浜涜鑰呭彲鑳借繕璁板緱 Matt Pietrek 2001 騫?1 鏈堢殑 <a >Under The Hood</a> 涓撴爮涓殑 LIBCTINY.LIB銆侺IBCTINY 鎵閲囩敤鐨勪竴涓妧宸ф槸涓涓?LIB 鏂囦歡錛屽畠閲嶅啓浜嗗叧閿?Visual C++ 榪愯鏃朵緥紼嬬殑鏍囧噯瀹炵幇銆傚皢 LIBCTINY.LIB 鏂囦歡緗簬閾炬帴鍣ㄨ鐨勫叾浠?LIB 涔嬪墠錛岄摼鎺ュ櫒灝嗕嬌鐢ㄨ繖涓瀹炵幇錛岃屼笉鏄嬌鐢?Microsoft 鎵鎻愪緵鐨勫鍏ュ簱涓殑鍚屽悕鍚庣畫鐗堟湰銆? <p>涓哄涓寸晫鍖哄簲鐢ㄧ被浼兼妧宸э紝鎴戜滑鍒涘緩 InitializeCriticalSection 鐨勪竴涓浛浠g増鏈強鍏剁浉鍏沖鍏ュ簱銆傚皢姝?LIB 鏂囦歡緗簬 KERNEL32.LIB 涔嬪墠錛岄摼鎺ュ櫒灝嗛摼鎺ユ垜浠殑鐗堟湰錛岃屼笉鏄?KERNEL32 涓殑鐗堟湰銆傚 InitializeCriticalSection 鐨勫疄鐜版樉紺哄湪<a >鍥?2</a> 涓傛浠g爜鍦ㄦ蹇典笂闈炲父綆鍗曘傚畠棣栧厛璋冪敤 KERNEL32.DLL 涓殑瀹為檯 InitializeCriticalSection銆傛帴涓嬫潵錛屽畠鑾峰緱璋冪敤 InitializeCriticalSection 鐨勪唬鐮佸湴鍧錛屽茍灝嗗叾璐磋嚦 RTL_CRITICAL_SECTION_DEBUG 緇撴瀯鐨勫鐢ㄥ瓧孌典箣涓銆傛垜浠殑浠g爜濡備綍紜畾璋冪敤浠g爜鐨勫湴鍧鍛紵x86 CALL 鎸囦護灝嗚繑鍥炲湴鍧緗簬鍫嗘爤涓侰riticalSectionHelper 浠g爜鐭ラ亾璇ヨ繑鍥炲湴鍧浣嶄簬鍫嗘爤甯т腑涓涓凡鐭ョ殑鍥哄畾浣嶇疆銆? <p>瀹為檯緇撴灉鏄細涓?CriticalSectionHelper.lib 姝g‘閾炬帴鐨勪換浣?EXE 鎴?DLL 閮藉皢瀵煎叆鎴戜滑鐨?DLL (CriticalSectionHelper.DLL)錛屽茍鍗犵敤搴旂敤浜嗗鐢ㄥ瓧孌電殑涓寸晫鍖恒傝繖鏍峰氨浣夸簨鎯呯畝鍗曚簡璁稿銆傜幇鍦ㄦ垜浠殑瀹炵敤宸ュ叿鍙互綆鍗曞湴閬嶅巻榪涚▼涓殑鎵鏈変復鐣屽尯錛屽茍涓斿彧鏄劇ず鍏鋒湁姝g‘濉厖鐨勫鐢ㄥ瓧孌電殑涓寸晫鍖轟俊鎭傞偅涔堥渶瑕佷負榪欎竴瀹炵敤宸ュ叿浠樺嚭浠涔堜唬浠峰憿錛熻紼嶇瓑錛岃繕鏈夋洿澶氱殑鍐呭錛? <p>鍥犱負鎮ㄧ殑鎵鏈変復鐣屽尯鐜板湪閮藉寘鍚鍏惰繘琛屽垵濮嬪寲鏃剁殑鍦板潃錛屽疄鐢ㄥ伐鍏峰彲浠ラ氳繃鎻愪緵鍏跺垵濮嬪寲鍦板潃鏉ヨ瘑鍒悇涓復鐣屽尯銆傚師濮嬩唬鐮佸湴鍧鏈韓娌℃湁閭d箞鏈夌敤銆傚垢榪愮殑鏄紝DBGHELP.DLL 浣夸唬鐮佸湴鍧鍚戞簮鏂囦歡銆佽鍙峰拰鍑芥暟鍚嶇О鐨勮漿鎹㈠彉寰楅潪甯稿鏄撱傚嵆浣夸竴涓復鐣屽尯涓病鏈夋偍鍦ㄥ叾涓殑絳懼悕錛屼篃鍙互灝嗗叾鍦板潃鎻愪氦緇?DBGHELP.DLL銆傚鏋滃皢鍏跺0鏄庝負涓涓叏灞鍙橀噺錛屽茍涓斿鏋滅鍙峰彲鐢紝鍒欐偍灝卞彲浠ュ湪鍘熷婧愪唬鐮佷腑紜畾涓寸晫鍖虹殑鍚嶇О銆傞『渚胯鏄庝竴涓嬶紝濡傛灉閫氳繃璁劇疆 _NT_SYMBOL_PATH 鐜鍙橀噺錛屽茍璁劇疆 DbgHelp 浠ヤ嬌鐢ㄥ叾 Symbol Server 涓嬭澆鍔熻兘錛屼粠鑰屼嬌 DbgHelp 鍙戞尌鍏舵晥鐢紝鍒欎細寰楀埌闈炲父濂界殑緇撴灉銆? <p>MyCriticalSections 瀹炵敤宸ュ叿 <p>鎴戜滑灝嗘墍鏈夎繖浜涙濇兂緇撳悎璧鋒潵錛屾彁鍑轟簡 MyCriticalSections 紼嬪簭銆侻yCriticalSections 鏄竴涓懡浠よ紼嬪簭錛屽湪涓嶄嬌鐢ㄥ弬鏁拌繍琛岃紼嬪簭鏃跺彲浠ョ湅鍒頒竴浜涢夐」錛?<pre>Syntax: MyCriticalSections <PID> [options] Options: /a = all critical sections /e = show only entered critical sections /v = verbose </pre> <p>鍞竴闇瑕佺殑鍙傛暟鏄?Program ID 鎴?PID錛堝崄榪涘埗褰㈠紡錛夈傚彲浠ョ敤澶氱鏂規硶鑾峰緱 PID錛屼絾鏈綆鍗曠殑鏂規硶鍙兘灝辨槸閫氳繃 Task Manager銆傚湪娌℃湁鍏朵粬閫夐」鏃訛紝MyCriticalSections 鍒楀嚭浜嗘潵鑷唬鐮佹ā鍧楃殑鎵鏈変復鐣屽尯鐘舵侊紝鎮ㄥ凡緇忓皢 CriticalSectionHelper.DLL 閾炬帴鑷寵繖浜涗唬鐮佹ā鍧椼傚鏋滄湁鍙敤浜庤繖涓錛堜簺錛夋ā鍧楃殑絎﹀彿錛屼唬鐮佸皢灝濊瘯鎻愪緵璇ヤ復鐣屽尯鐨勫悕縐幫紝浠ュ強瀵瑰叾榪涜鍒濆鍖栫殑浣嶇疆銆? <p>瑕佹煡鐪?MyCriticalSections 鏄浣曡搗浣滅敤鐨勶紝璇瘋繍琛?Demo.EXE 紼嬪簭錛岃紼嬪簭鍖呭惈鍦ㄤ笅杞芥枃浠朵腑銆侱emo.EXE 鍙槸鍒濆鍖栦袱涓復鐣屽尯錛屽茍鐢變竴瀵圭嚎紼嬭繘鍏ヨ繖涓や釜涓寸晫鍖恒?a >鍥?3</a> 鏄劇ず榪愯鈥淢yCriticalSections 2040鈥濈殑緇撴灉錛堝叾涓?2040 涓?Demo.EXE 鐨?PID錛夈? <p>鍦ㄨ鍥句腑錛屽垪鍑轟簡涓や釜涓寸晫鍖恒傚湪鏈緥涓紝瀹冧滑琚懡鍚嶄負 csMain 鍜?yetAnotherCriticalSection銆傛瘡涓淎ddress:鈥濊鏄劇ず浜?CRITICAL_SECTION 鐨勫湴鍧鍙婂叾鍚嶇О銆傗淚nitialized in鈥濊鍖呭惈浜嗗湪鍏朵腑鍒濆鍖?CRITICAL_SECTION 鐨勫嚱鏁板悕銆備唬鐮佺殑鈥淚nitialized at鈥濊鏄劇ず浜嗘簮鏂囦歡鍜屽垵濮嬪寲鍑芥暟涓殑琛屽彿銆? <p>瀵逛簬 csMain 涓寸晫鍖猴紝鎮ㄥ皢鐪嬪埌閿佸畾鏁頒負 0銆侀掑綊鏁頒負 1錛岃〃紺轟竴涓凡緇忚涓綰跨▼鑾峰緱鐨勪復鐣屽尯錛屽茍涓旀病鏈夊叾浠栫嚎紼嬪湪絳夊緟璇ヤ復鐣屽尯銆傚洜涓轟粠鏉ユ病鏈夌嚎紼嬭闃繪浜庤涓寸晫鍖猴紝鎵浠?Entry Count 瀛楁涓?0銆? <p>鐜板湪鏉ョ湅 yetAnotherCriticalSection錛屼細鍙戠幇鍏墮掑綊鏁頒負 3銆傚揩閫熸祻瑙?Demo 浠g爜鍙互鐪嬪嚭錛氫富綰跨▼璋冪敤 EnterCriticalSection 涓夋錛屾墍浠ヤ簨鎯呯殑鍙戠敓涓庨鏈熶竴鑷淬備絾鏄紝榪樻湁涓涓浜岀嚎紼嬭瘯鍥捐幏寰楄涓寸晫鍖猴紝騫朵笖宸茬粡琚樆姝€傚悓鏍鳳紝LockCount 瀛楁涔熶負 3銆傛杈撳嚭鏄劇ず鏈変竴涓瓑寰呯嚎紼嬨? <p>MyCriticalSections 鎷ユ湁涓浜涢夐」錛屼嬌鍏跺浜庢洿涓哄媷鏁㈢殑鎺㈢儲鑰呴潪甯告湁鐢ㄣ?v 寮鍏蟲樉紺烘瘡涓復鐣屽尯鐨勬洿澶氫俊鎭傛棆杞暟涓庨攣瀹氫俊鍙峰瓧孌靛挨涓洪噸瑕併傛偍緇忓父浼氱湅鍒?NTDLL 鍜屽叾浠?DLL 鎷ユ湁涓浜涙棆杞暟闈為浂鐨勪復鐣屽尯銆傚鏋滀竴涓嚎紼嬪湪鑾峰緱涓寸晫鍖虹殑榪囩▼涓浘琚攣瀹氾紝鍒欓攣瀹氫俊鍙峰瓧孌典負闈為浂鍊箋?v 寮鍏寵繕鏄劇ず浜?RTL_CRITICAL_SECTION_DEBUG 緇撴瀯涓鐢ㄥ瓧孌電殑鍐呭銆? <p>/a 寮鍏蟲樉紺鴻繘紼嬩腑鐨勬墍鏈変復鐣屽尯錛屽嵆浣垮叾涓病鏈?CriticalSectionHelper.DLL 絳懼悕涔熶細鏄劇ず銆傚鏋滀嬌鐢?/a錛屽垯璇峰仛濂芥湁澶ч噺杈撳嚭鐨勫噯澶囥傜湡姝g殑榛戝甯屾湜鍚屾椂浣跨敤 /a 鍜?/v錛屼互鏄劇ず榪涚▼涓叏閮ㄥ唴瀹圭殑鏈澶氱粏鑺傘備嬌鐢?/a 鐨勪竴涓皬灝忕殑濂藉鏄細鐪嬪埌 NTDLL 涓殑LdrpLoaderLock 涓寸晫鍖恒傛涓寸晫鍖哄湪 DllMain 璋冪敤鍜屽叾浠栦竴浜涢噸瑕佹椂闂村唴琚崰鐢ㄣ侺drpLoaderLock 鏄澶氫笉澶槑鏄俱佽〃闈笂闅句互瑙i噴鐨勬閿佺殑褰㈡垚鍘熷洜涔嬩竴銆傦紙涓轟嬌 MyCriticalSection 鑳藉姝g‘鏍囪 LdrpLoaderLock 瀹炰緥錛岄渶瑕佺敤浜?NTDLL 鐨?PDB 鏂囦歡鍙緵浣跨敤銆傦級 <p>/e 寮鍏充嬌紼嬪簭浠呮樉紺哄綋鍓嶈鍗犵敤鐨勪復鐣屽尯銆傛湭浣跨敤 /a 寮鍏蟲椂錛屽彧鏄劇ず浠g爜涓鍗犵敤鐨勪復鐣屽尯錛堝澶囩敤瀛楁涓殑絳懼悕鎵鎸囩ず錛夈傞噰鐢?/a 寮鍏蟲椂錛屽皢鏄劇ず榪涚▼涓殑鍏ㄩ儴琚崰鐢ㄤ復鐣屽尯錛岃屼笉鑰冭檻鍏舵潵婧愩? <p>閭d箞錛屽笇鏈涗粈涔堟椂鍊欒繍琛?MyCriticalSections 鍛紵涓涓緢鏄庣‘鐨勬椂闂存槸鍦ㄧ▼搴忚姝婚攣鏃躲傛鏌ヨ鍗犵敤鐨勪復鐣屽尯錛屼互鏌ョ湅鏄惁鏈変粈涔堜嬌鎮ㄦ儕璁剁殑浜嬫儏銆傚嵆浣胯姝婚攣鐨勭▼搴忔榪愯浜庤皟璇曞櫒鐨勬帶鍒朵箣涓嬶紝涔熷彲浠ヤ嬌鐢?MyCriticalSections銆? <p>鍙︿竴縐嶄嬌鐢?MyCriticalSections 鐨勬椂鏈烘槸鍦ㄥ鏈夊ぇ閲忓綰跨▼鐨勭▼搴忚繘琛屾ц兘璋冩暣鏃躲傚湪闃誨浜庤皟璇曞櫒涓殑涓涓嬌鐢ㄩ綣併侀潪閲嶅叆鍑芥暟鏃訛紝榪愯 MyCriticalSections錛屾煡鐪嬪湪璇ユ椂鍒誨崰鐢ㄤ簡鍝簺涓寸晫鍖恒傚鏋滄湁寰堝綰跨▼閮芥墽琛岀浉鍚屼換鍔★紝灝遍潪甯稿鏄撳鑷翠竴縐嶆儏褰細涓涓嚎紼嬬殑澶ч儴鍒嗘椂闂磋娑堣楀湪絳夊緟鑾峰緱涓涓嬌鐢ㄩ綣佺殑涓寸晫鍖轟笂銆傚鏋滄湁澶氫釜浣跨敤棰戠箒鐨勪復鐣屽尯錛岃繖閫犳垚鐨勫悗鏋滃氨鍍忚姳鍥殑嫻囨按杞鎵撲簡緇撲竴鏍楓傝В鍐充竴涓簤鐢ㄩ棶棰樺彧鏄皢闂杞Щ鍒頒笅涓涓鏄撻犳垚闃誨鐨勪復鐣屽尯銆? <p>涓涓煡鐪嬪摢浜涗復鐣屽尯鏈瀹規槗瀵艱嚧浜夌敤鐨勫ソ鏂規硶鏄湪鎺ヨ繎紼嬪簭緇撳熬澶勮緗竴涓柇鐐廣傚湪閬囧埌鏂偣鏃訛紝榪愯 MyCriticalSections 騫舵煡鎵懼叿鏈夋渶澶?Entry Count 鍊肩殑涓寸晫鍖恒傛鏄繖浜涗復鐣屽尯瀵艱嚧浜嗗ぇ澶氭暟闃誨鍜岀嚎紼嬭漿鎹€? <p>灝界 MyCriticalSections 榪愯浜?Windows 2000 鍙婃洿鏂扮増鏈紝浣嗘偍浠嶉渶瑕佷竴涓瘮杈冩柊鐨?DbgHelp.DLL 鐗堟湰 錛?5.1 鐗堟垨鏇存柊鐗堟湰銆俉indows XP 涓彁渚涜繖涓鐗堟湰銆備篃鍙互鐢卞叾浠栦嬌鐢?DbgHelp 鐨勫伐鍏蜂腑鑾峰緱璇ョ増鏈備緥濡傦紝<a >Debugging Tools For Windows</a> 涓嬭澆涓氬父鎷ユ湁鏈鏂扮殑 DbgHelp.DLL銆? <p>娣卞叆鐮旂┒閲嶈鐨勪復鐣屽尯渚嬬▼ <p>姝ゆ渶鍚庝竴鑺傛槸涓洪偅浜涘笇鏈涚悊瑙d復鐣屽尯瀹炵幇鍐呭箷鐨勫媷鏁㈣鑰呮彁渚涚殑銆傚 NTDLL 榪涜浠旂粏鐮旂┒鍚庡彲浠ヤ負榪欎簺渚嬬▼鍙婂叾鏀寔瀛愪緥紼嬪垱寤轟吉鐮侊紙瑙佷笅杞戒腑鐨?NTDLL(CriticalSections).cpp錛夈備互涓?KERNEL32 API 緇勬垚涓寸晫鍖虹殑鍏叡鎺ュ彛錛?<pre>InitializeCriticalSection InitializeCriticalSectionAndSpinCount DeleteCriticalSection TryEnterCriticalSection EnterCriticalSection LeaveCriticalSection </pre> <p>鍓嶄袱涓?API 鍙槸鍒嗗埆鍥寸粫 NTDLL API RtlInitializeCriticalSection 鍜?RtlInitializeCriticalSectionAndSpinCount 鐨勭槮鍖呰銆傛墍鏈夊墿浣欎緥紼嬮兘琚彁浜ょ粰 NTDLL 涓殑鍑芥暟銆傚彟澶栵紝瀵?RtlInitializeCriticalSection 鐨勮皟鐢ㄦ槸鍙︿竴涓洿緇?RtlInitializeCriticalSectionAndSpinCount 璋冪敤鐨勭槮鍖呰錛屽叾鏃嬭漿鏁扮殑鍊間負 0銆備嬌鐢ㄤ復鐣屽尯鐨勬椂鍊欏疄闄呬笂鏄湪騫曞悗浣跨敤浠ヤ笅 NTDLL API錛?<pre>RtlInitializeCriticalSectionAndSpinCount RtlEnterCriticalSection RtlTryEnterCriticalSection RtlLeaveCriticalSection RtlDeleteCriticalSection </pre> <p>鍦ㄨ繖涓璁ㄨ涓紝鎴戜滑閲囩敤 Kernel32 鍚嶇О錛屽洜涓哄ぇ澶氭暟 Win32 紼嬪簭鍛樺瀹冧滑鏇翠負鐔熸倝銆? <p>InitializeCriticalSectionAndSpinCount 瀵逛復鐣屽尯鐨勫垵濮嬪寲闈炲父綆鍗曘俁TL_CRITICAL_SECTION 緇撴瀯涓殑瀛楁琚祴浜堝叾璧峰鍊箋備笌姝ょ被浼鹼紝鍒嗛厤 RTL_CRITICAL_SECTION_DEBUG 緇撴瀯騫跺鍏惰繘琛屽垵濮嬪寲錛屽皢 RtlLogStackBackTraces 璋冪敤涓殑榪斿洖鍊艱祴浜?CreatorBackTraceIndex錛屽茍寤虹珛鍒板墠闈復鐣屽尯鐨勯摼鎺ャ? <p>欏轟究璇翠竴澹幫紝CreatorBackTraceIndex 涓鑸帴鏀跺埌鐨勫間負 0銆備絾鏄紝濡傛灉鏈?Gflags 鍜?Umdh 瀹炵敤宸ュ叿錛屽彲浠ヨ緭鍏ヤ互涓嬪懡浠わ細 <pre>Gflags /i MyProgram.exe +ust Gflags /i MyProgram.exe /tracedb 24 </pre> <p>榪欎簺鍛戒護浣垮緱 MyProgram 鐨勨淚mage File Execution Options鈥濅笅娣誨姞浜嗘敞鍐岃〃欏廣傚湪涓嬩竴嬈℃墽琛?MyProgram 鏃朵細鐪嬪埌姝ゅ瓧孌墊帴鏀跺埌涓涓潪 0 鏁板箋傛湁鍏蟲洿澶氫俊鎭紝鍙傞槄鐭ヨ瘑搴撴枃绔?Q268343鈥?a >Umdhtools.exe:How to Use Umdh.exe to Find Memory Leaks</a>鈥濄備復鐣屽尯鍒濆鍖栦腑鍙︿竴涓渶瑕佹敞鎰忕殑闂鏄細鍓?64 涓?RTL_CRITICAL_SECTION_DEBUG 緇撴瀯涓嶆槸鐢辮繘紼嬪爢涓垎閰嶏紝鑰屾槸鏉ヨ嚜浣嶄簬 NTDLL 鍐呯殑 .data 鑺傜殑涓涓暟緇勩? <p>鍦ㄥ畬鎴愪復鐣屽尯鐨勪嬌鐢ㄤ箣鍚庯紝瀵?DeleteCriticalSection錛堝叾鍛藉悕涓嶅綋錛屽洜涓哄畠鍙垹闄?RTL_CRITICAL_SECTION_ DEBUG錛夌殑璋冪敤閬嶅巻涓涓悓鏍峰彲鐞嗚В鐨勮礬寰勩傚鏋滅敱浜庣嚎紼嬪湪灝濊瘯鑾峰緱涓寸晫鍖烘椂琚樆姝㈣屽垱寤轟簡涓涓簨浠訛紝灝嗛氳繃璋冪敤 ZwClose 鏉ラ攢姣佽浜嬩歡銆傛帴涓嬫潵錛屽湪閫氳繃 RtlCriticalSectionLock 鑾峰緱淇濇姢涔嬪悗錛圢TDLL 浠ヤ竴涓復鐣屽尯淇濇姢瀹冭嚜宸辯殑鍐呴儴涓寸晫鍖哄垪琛?鈥?鎮ㄧ寽瀵逛簡錛夛紝灝嗚皟璇曚俊鎭粠閾句腑娓呴櫎錛屽璇ヤ復鐣屽尯閾捐〃榪涜鏇存柊錛屼互鍙嶆槧瀵硅淇℃伅鐨勬竻闄ゆ搷浣溿傝鍐呭瓨鐢辯┖鍊煎~鍏咃紝騫朵笖濡傛灉鍏跺瓨鍌ㄥ尯鏄敱榪涚▼鍫嗕腑鑾峰緱錛屽垯璋冪敤 RtlFreeHeap 灝嗕嬌寰楀叾鍐呭瓨琚噴鏀俱傛渶鍚庯紝浠ラ浂濉厖 RTL_CRITICAL_SECTION銆? <p>鏈変袱涓?API 瑕佽幏寰楀彈涓寸晫鍖轟繚鎶ょ殑璧勬簮 鈥?TryEnterCriticalSection 鍜?EnterCriticalSection銆傚鏋滀竴涓嚎紼嬮渶瑕佽繘鍏ヤ竴涓復鐣屽尯錛屼絾鍦ㄧ瓑寰呰闃繪璧勬簮鍙樹負鍙敤鐨勫悓鏃訛紝鍙墽琛屾湁鐢ㄧ殑宸ヤ綔錛岄偅涔?TryEnterCriticalSection 姝f槸鎮ㄩ渶瑕佺殑 API銆傛渚嬬▼嫻嬭瘯姝や復鐣屽尯鏄惁鍙敤錛涘鏋滆涓寸晫鍖鴻鍗犵敤錛岃浠g爜灝嗚繑鍥炲?FALSE錛屼負璇ョ嚎紼嬫彁渚涚戶緇墽琛屽彟涓浠誨姟鐨勬満浼氥傚惁鍒欙紝鍏朵綔鐢ㄥ彧鏄浉褰撲簬 EnterCriticalSection銆? <p>濡傛灉璇ョ嚎紼嬪湪緇х畫榪涜涔嬪墠紜疄闇瑕佹嫢鏈夎璧勬簮錛屽垯浣跨敤 EnterCriticalSection銆傛鏃訛紝鍙栨秷鐢ㄤ簬澶氬鐞嗗櫒璁$畻鏈虹殑 SpinCount 嫻嬭瘯銆傝繖涓渚嬬▼涓?TryEnterCriticalSection 綾諱技錛屾棤璁鴻涓寸晫鍖烘槸絀洪棽鐨勬垨宸茬粡琚綰跨▼鎵鎷ユ湁錛岄兘璋冩暣瀵硅涓寸晫鍖虹殑綈胯銆傛敞鎰忥紝鏈閲嶈鐨?LockCount 閫掑鏄敱 x86鈥渓ock鈥濆墠緙瀹屾垚鐨勶紝榪欎竴鐐歸潪甯擱噸瑕併傝繖紜繚浜嗗湪鏌愪竴鏃墮棿鍐呭彧鏈変竴涓?CPU 鍙互淇敼璇?LockCount 瀛楁銆傦紙浜嬪疄涓婏紝Win32 InterlockedIncrement API 鍙槸涓涓叿鏈夌浉鍚岄攣瀹氬墠緙鐨?ADD 鎸囦護銆傦級 <p>濡傛灉璋冪敤綰跨▼鏃犳硶绔嬪嵆鑾峰緱璇ヤ復鐣屽尯錛屽垯璋冪敤 RtlpWaitForCriticalSection 灝嗚綰跨▼緗簬絳夊緟鐘舵併傚湪澶氬鐞嗗櫒緋葷粺涓紝EnterCriticalSection 鏃嬭漿 SpinCount 鎵鎸囧畾鐨勬鏁幫紝騫跺湪姣忔寰幆璁塊棶涓祴璇曡涓寸晫鍖虹殑鍙敤鎬с傚鏋滄涓寸晫鍖哄湪寰幆鏈熼棿鍙樹負絀洪棽錛岃綰跨▼鑾峰緱璇ヤ復鐣屽尯錛屽茍緇х畫鎵ц銆? <p>RtlpWaitForCriticalSection 鍙兘鏄繖閲屾墍緇欑殑鎵鏈夎繃紼嬩腑鏈涓哄鏉傘佹渶涓洪噸瑕佺殑涓涓傝繖騫朵笉鍊煎緱澶ф儕灝忔紝鍥犱負濡傛灉瀛樺湪涓涓閿佸茍娑夊強涓寸晫鍖猴紝鍒欏埄鐢ㄨ皟璇曞櫒榪涘叆璇ヨ繘紼嬪氨鍙兘鏄劇ず鍑?RtlpWaitForCriticalSection 鍐?ZwWaitForSingleObject 璋冪敤涓殑鑷沖皯涓涓嚎紼嬨? <p>濡備吉鐮佷腑鎵鏄劇ず錛屽湪 RtlpWaitForCriticalSection 涓湁涓鐐圭翱璁板伐浣滐紝濡傞掑 EntryCount 鍜?ContentionCount 瀛楁銆備絾鏇撮噸瑕佺殑鏄細鍙戝嚭瀵?LockSemaphore 鐨勭瓑寰咃紝浠ュ強瀵圭瓑寰呯粨鏋滅殑澶勭悊銆傞粯璁ゆ儏鍐墊槸灝嗕竴涓┖鎸囬拡浣滀負絎笁涓弬鏁頒紶閫掔粰 ZwWaitForSingleObject 璋冪敤錛岃姹傝絳夊緟姘歌繙涓嶈瓚呮椂銆傚鏋滃厑璁歌秴鏃訛紝灝嗙敓鎴愯皟璇曟秷鎭瓧絎︿覆錛屽茍鍐嶆寮濮嬬瓑寰呫傚鏋滀笉鑳戒粠絳夊緟涓垚鍔熻繑鍥烇紝灝變細浜х敓涓璇ヨ繘紼嬬殑閿欒銆傛渶鍚庯紝鍦ㄤ粠 ZwWaitForSingleObject 璋冪敤涓垚鍔熻繑鍥炴椂錛屽垯鎵ц浠?RtlpWaitForCriticalSection 榪斿洖錛岃綰跨▼鐜板湪鎷ユ湁璇ヤ復鐣屽尯銆? <p>RtlpWaitForCriticalSection 蹇呴』璁よ瘑鍒扮殑涓涓復鐣屾潯浠舵槸璇ヨ繘紼嬫鍦ㄨ鍏抽棴錛屽茍涓旀鍦ㄧ瓑寰呭姞杞界▼搴忛攣瀹?(LdrpLoaderLock) 涓寸晫鍖恒俁tlpWaitForCriticalSection 涓瀹?em>涓嶈兘</em> 鍏佽璇ョ嚎紼嬭闃繪錛屼絾鏄繀欏昏煩榪囪絳夊緟錛屽茍鍏佽緇х畫榪涜鍏抽棴鎿嶄綔銆? <p>LeaveCriticalSection 涓嶅儚 EnterCriticalSection 閭f牱澶嶆潅銆傚鏋滃湪閫掑噺 RecursionCount 涔嬪悗錛岀粨鏋滀笉涓?0錛堟剰鍛崇潃璇ョ嚎紼嬩粛鐒舵嫢鏈夎涓寸晫鍖猴級錛屽垯璇ヤ緥紼嬪皢浠?ERROR_SUCCESS 鐘舵佽繑鍥炪傝繖灝辨槸涓轟粈涔堥渶瑕佺敤閫傚綋鏁扮洰鐨?Leave 璋冪敤鏉ュ鉤琛?Enter 璋冪敤銆傚鏋滆璁℃暟涓?0錛屽垯 OwningThread 瀛楁琚竻闆訛紝LockCount 琚掑噺銆傚鏋滆繕鏈夊叾浠栫嚎紼嬪湪絳夊緟錛屼緥濡?LockCount 澶т簬鎴栫瓑浜?0錛屽垯璋冪敤 RtlpUnWaitCriticalSection銆傛甯姪鍣ㄤ緥紼嬪垱寤?LockSemaphore錛堝鏋滃叾灝氭湭瀛樺湪錛夛紝騫跺彂鍑鴻淇″彿鎻愰啋鎿嶄綔緋葷粺錛氳綰跨▼宸茬粡閲婃斁璇ヤ復鐣屽尯銆備綔涓洪氱煡鐨勪竴閮ㄥ垎錛岀瓑寰呯嚎紼嬩箣涓閫鍑虹瓑寰呯姸鎬侊紝涓鴻繍琛屽仛濂藉噯澶囥? <p>鏈鍚庤璇存槑鐨勪竴鐐規槸錛孧yCriticalSections 紼嬪簭濡備綍紜畾涓寸晫鍖洪摼鐨勮搗濮嬪憿錛熷鏋滄湁鏉冭闂?NTDLL 鐨勬紜皟璇曠鍙鳳紝鍒欏璇ュ垪琛ㄧ殑鏌ユ壘鍜岄亶鍘嗛潪甯哥畝鍗曘傞鍏堬紝瀹氫綅絎﹀彿 RtlCriticalSectionList錛屾竻絀哄叾鍐呭錛堝畠鎸囧悜絎竴涓?RTL_CRITICAL_SECTION_DEBUG 緇撴瀯錛夛紝騫跺紑濮嬮亶鍘嗐備絾鏄紝騫朵笉鏄墍鏈夌殑緋葷粺閮芥湁璋冭瘯絎﹀彿錛孯tlCriticalSectionList 鍙橀噺鐨勫湴鍧浼氶殢 Windows 鐨勫悇涓増鏈屽彂鐢熷彉鍖栥備負浜嗘彁渚涗竴縐嶅鎵鏈夌増鏈兘鑳芥甯稿伐浣滅殑瑙e喅鏂規錛屾垜浠璁′簡浠ヤ笅璇曟帰鎬ф柟妗堛傝瀵熷惎鍔ㄤ竴涓繘紼嬫椂鎵閲囧彇鐨勬楠わ紝浼氱湅鍒版槸浠ヤ互涓嬮『搴忓 NTDLL 涓殑涓寸晫鍖鴻繘琛屽垵濮嬪寲鐨勶紙榪欎簺鍚嶇О鍙栬嚜 NTDLL 鐨勮皟璇曠鍙鳳級錛?<pre>RtlCriticalSectionLock DeferedCriticalSection (this is the actual spelling!) LoaderLock FastPebLock RtlpCalloutEntryLock PMCritSect UMLogCritSect RtlpProcessHeapsListLock </pre> <p>鍥犱負媯鏌ヨ繘紼嬬幆澧冨潡 (PEB) 涓亸縐婚噺 0xA0 澶勭殑鍦板潃灝卞彲浠ユ壘鍒板姞杞界▼搴忛攣錛屾墍浠ュ璇ラ摼璧峰浣嶇疆鐨勫畾浣嶅氨鍙樺緱姣旇緝綆鍗曘傛垜浠鍙栨湁鍏沖姞杞界▼搴忛攣鐨勮皟璇曚俊鎭紝鐒跺悗娌跨潃閾懼悜鍚庨亶鍘嗕袱涓摼鎺ワ紝浣挎垜浠畾浣嶄簬 RtlCriticalSectionLock 欏癸紝鍦ㄨ鐐瑰緱鍒拌閾劇殑絎竴涓復鐣屽尯銆傛湁鍏沖叾鏂規硶鐨勮鏄庯紝璇峰弬瑙?strong>鍥?4</strong>銆? <p><img height="284" alt="fig04" src="http://www.microsoft.com/china/MSDN/library/enterprisedevelopment/softwaredev/art/Deadlockfig04.gif" width="325" border="0"> <p><strong>鍥?4 鍒濆鍖栭『搴?/strong> <p>灝忕粨 <p>鍑犱箮鎵鏈夌殑澶氱嚎紼嬬▼搴忓潎浣跨敤涓寸晫鍖恒傛偍榪熸棭閮戒細閬囧埌涓涓嬌浠g爜姝婚攣鐨勪復鐣屽尯錛屽茍涓斾細闅句互紜畾鏄浣曡繘鍏ュ綋鍓嶇姸鎬佺殑銆傚鏋滆兘澶熸洿娣卞叆鍦頒簡瑙d復鐣屽尯鐨勫伐浣滃師鐞嗭紝鍒欒繖涓鎯呭艦鐨勫嚭鐜板氨涓嶄細鍍忛嬈″嚭鐜版椂閭f牱鐨勪護浜烘伯涓с傛偍鍙互鐮旂┒涓涓湅鏉ラ潪甯稿惈緋婄殑涓寸晫鍖猴紝騫剁‘瀹氭槸璋佹嫢鏈夊畠錛屼互鍙婂叾浠栨湁鐢ㄧ粏鑺傘傚鏋滄偍鎰挎剰灝嗘垜浠殑搴撳姞鍏ユ偍鐨勯摼鎺ュ櫒琛岋紝鍒欏彲浠ュ鏄撳湴鑾峰緱鏈夊叧鎮ㄧ▼搴忎復鐣屽尯浣跨敤鐨勫ぇ閲忎俊鎭傞氳繃鍒╃敤涓寸晫鍖虹粨鏋勪腑鐨勪竴浜涙湭鐢ㄥ瓧孌碉紝鎴戜滑鐨勪唬鐮佸彲浠ヤ粎闅旂騫跺懡鍚嶆偍鐨勬ā鍧楁墍鐢ㄧ殑涓寸晫鍖猴紝騫跺憡鐭ュ叾鍑嗙‘鐘舵併? <p>鏈夐瓌鍔涚殑璇昏呭彲浠ュ緢瀹規槗鍦板鎴戜滑鐨勪唬鐮佽繘琛屾墿灞曪紝浠ュ畬鎴愭洿涓哄紓涔庡甯哥殑宸ヤ綔銆備緥濡傦紝閲囩敤涓?InitializeCriticalSection 鎸傞挬鐩哥被浼肩殑鏂瑰紡鎴幏 EnterCriticalSection 鍜?LeaveCriticalSection錛屽彲浠ュ瓨鍌ㄦ渶鍚庝竴嬈℃垚鍔熻幏寰楀拰閲婃斁璇ヤ復鐣屽尯鐨勪綅緗備笌姝ょ被浼鹼紝CritSect DLL 鎷ユ湁涓涓槗浜庤皟鐢ㄧ殑 API錛岀敤浜庢灇涓炬偍鑷繁鐨勪唬鐮佷腑鐨勪復鐣屽尯銆傚埄鐢?.NET Framework 涓殑 Windows 紿椾綋錛屽彲浠ョ浉瀵瑰鏄撳湴鍒涘緩涓涓?GUI 鐗堟湰鐨?MyCriticalSections銆傚鎴戜滑浠g爜榪涜鎵╁睍鐨勫彲鑳芥ч潪甯稿ぇ錛屾垜浠潪甯鎬箰鎰忕湅鍒板叾浠栦漢鍛樻墍鍙戠幇鍜屽垱閫犵殑鍒涙柊鎬у姙娉曘? <p><strong>鏈夊叧鏂囩珷錛岃鍙傞槄錛?/strong><br><a >Global Flag Reference:Create kernel mode stack trace database</a><br><a >GFlags Examples:Enlarging the User-Mode Stack Trace Database</a><br><a >Under the Hood:Reduce EXE and DLL Size with LIBCTINY.LIB</a> <p><strong>Matt Pietrek</strong> 鏄竴浣嶈蔣浠舵灦鏋勫笀鍜屼綔鑰呫備粬灝辮亴浜?Compuware/NuMega 瀹為獙瀹わ紝韜喚涓?BoundsChecker 鍜屸滃垎甯冨紡鍒嗘瀽鍣ㄢ濅駭鍝佺殑棣栧腑鏋舵瀯甯堛備粬宸茬粡鍒涗綔浜嗕笁鏈湁鍏?Windows 緋葷粺緙栫▼鐨勪功綾嶏紝騫舵槸 <em>MSDN Magazine</em> 鐨勭壒綰︾紪杈戙備粬鐨?Web 绔欑偣 (<a >http://www.wheaty.net</a>) 鏈夊叧浜庝互鍓嶆枃绔犲拰涓撴爮鐨?FAQ 鍜屼俊鎭? <p><strong>Jay Hilyard</strong> 鏄?Compuware/NuMega 瀹為獙瀹ょ殑 BoundsChecker 灝忕粍鐨勮蔣浠跺伐紼嬪笀銆備粬銆佷粬鐨勫瀛愬拰浠栦滑鐨勭尗鏄柊緗曞竷浠灝斿窞鐨勬柊灞呮皯銆備粬鐨勮仈緋繪柟寮忎負 <a href="mailto:RussOsterlund@adelphia.net">RussOsterlund@adelphia.net</a> 鎴?Web 绔欑偣 <a >http://www.smidgeonsoft.com</a>銆? <p><a >杞埌鍘熻嫳鏂囬〉闈?/a><img src ="http://m.shnenglu.com/jans2002/aggbug/74367.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/jans2002/" target="_blank">jans2002</a> 2009-02-20 10:03 <a href="http://m.shnenglu.com/jans2002/archive/2009/02/20/74367.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>濡備綍鏍規嵁紼嬪簭宕╂簝鏃剁殑DMP鏂囦歡浣跨敤WinDbg鏌ユ壘璋冪敤鍫嗘爤http://m.shnenglu.com/jans2002/archive/2009/01/08/71500.htmljans2002jans2002Thu, 08 Jan 2009 07:53:00 GMThttp://m.shnenglu.com/jans2002/archive/2009/01/08/71500.htmlhttp://m.shnenglu.com/jans2002/comments/71500.htmlhttp://m.shnenglu.com/jans2002/archive/2009/01/08/71500.html#Feedback0http://m.shnenglu.com/jans2002/comments/commentRss/71500.htmlhttp://m.shnenglu.com/jans2002/services/trackbacks/71500.html 

HOW TO錛?鏌ユ壘闂鐨勫紓甯稿爢鏍堟椂鍑虹幇鐨?UnhandledExceptionFilter 璋冪敤鍫嗘爤璺熻釜涓?/h3>

http://support.microsoft.com/kb/313109/zh-cn

瀵熺湅鏈枃搴旂敤浜庣殑浜у搧

鏈〉

灞曞紑鍏ㄩ儴 | 鍏抽棴鍏ㄩ儴

姒傝

娌℃湁寮傚父澶勭悊紼嬪簭瀹氫箟澶勭悊寮曞彂鐨勫紓甯告椂錛屽皢璋冪敤璇?UnhandledExceptionFilter 鍑芥暟銆?閫氬父錛岃鍑芥暟浼氬皢寮傚父浼犻掔粰鍦?Ntdll.dll 涓烘枃...

娌℃湁寮傚父澶勭悊紼嬪簭瀹氫箟澶勭悊寮曞彂鐨勫紓甯告椂錛屽皢璋冪敤璇?UnhandledExceptionFilter 鍑芥暟銆?閫氬父錛岃鍑芥暟浼氬皢寮傚父浼犻掔粰鍦?Ntdll.dll 涓烘枃浠跺叾涓崟鑾鳳紝騫跺皾璇曞鐞嗚緗?
鍦ㄨ繘紼嬬殑鍐呭瓨蹇収鎵鍦ㄦ煇浜涙儏鍐典笅錛屽彲浠ョ湅鍒伴攣瀹氱偣淇濆瓨鍒扮嚎紼嬬殑綰跨▼鐨勮皟鐢?UnhandledExceptionFilter 鍑芥暟銆?鍦ㄨ繖鐨勭鎯呭喌涓嬫偍鍙互鎸夌収鏈枃浠ョ‘瀹氬鑷存寮傚父鐨?DLL銆?

鍥炲埌欏剁

浣跨敤 Windbg.exe 鎵撳紑杞偍鏂囦歡
  1. 涓嬭澆騫跺畨瑁呰皟璇曠▼搴忋?瑕佷笅杞借皟璇曠▼搴忥紝璇瘋闂笅闈㈢殑 Microsoft 緗戠珯錛?

    Microsoft 璋冭瘯宸ュ叿
    http://www.microsoft.com/whdc/devtools/ddk/default.mspx (http://www.microsoft.com/whdc/devtools/ddk/default.mspx)

  2. 鎵撳紑瀹夎璋冭瘯紼嬪簭錛屾枃浠跺す錛岀劧鍚庡弻鍑?Windbg.exe 鍚姩璋冭瘯鍣ㄣ?
  3. 鍦?鏂囦歡 鑿滃崟涓婂崟鍑?鎵撳紑鐨勫穿婧冭漿鍌?錛堟垨鎸?Ctrl+D錛夛紝鐒跺悗閫夋嫨瑕佹煡鐪嬭杞偍鏂囦歡銆?/li>

鍥炲埌欏剁

浣跨敤 Windbg.exe 紜畾寮傚父鍫嗘爤
  1. 鍦?Windbg.exe錛屾墦寮榪涚▼鐨?dmp 鏂囦歡銆?
  2. 璇風‘淇濇偍絎﹀彿璺緞鎸囧悜姝g‘鐨勪綅緗?鏈夊叧濡備綍鎵ц姝ゆ搷浣滐紝璇瘋闂笅闈㈢殑 Microsoft Web 绔欑偣錛?

    濡備綍鑾峰緱絎﹀彿
    http://www.microsoft.com/whdc/devtools/ddk/default.mspx (http://www.microsoft.com/whdc/devtools/ddk/default.mspx)

  3. 鍦ㄥ懡浠ゆ彁紺虹涓嬮敭鍏?~ * kb 浠ュ垪鍑烘墍鏈夎繘紼嬩腑鐨勭嚎紼嬨?
  4. 鏍囪瘑瀵瑰嚱鏁拌皟鐢ㄧ殑綰跨▼ Kernel32! UnhandledExceptionFilter 銆?瀹冪被浼間簬浠ヤ笅錛?

    120  id: f0f0f0f0.a1c   Suspend: 1 Teb 7ff72000 Unfrozen
    ChildEBP RetAddr  Args to Child              
    09a8f334 77eb9b46 0000244c 00000001 00000000 ntdll!ZwWaitForSingleObject+0xb [i386\usrstubs.asm @ 2004]
    09a8f644 77ea7e7a 09a8f66c 77e861ae 09a8f674 KERNEL32!UnhandledExceptionFilter+0x2b5 
    [D:\nt\private\windows\base\client\thread.c @ 1753]
    09a8ffec 00000000 787bf0b8 0216fe94 00000000 KERNEL32!BaseThreadStart+0x65 [D:\nt\private\windows\base\client\support.c @ 453]
    					
  5. 鍒囨崲鍒拌綰跨▼ 錛堝湪鏈緥涓紝璇ョ嚎紼嬫槸"~120s"錛夈?
  6. 鍦ㄧ涓涓弬鏁扮殑鎸囧畾浣嶇疆鏄劇ず鍐呭瓨鍐呭 Kernel32! UnhandledExceptionFilter 閫氳繃 娣誨姞 絎竴涓弬鏁?銆?姝ゆ寚鍚?EXCEPTION_POINTERS 緇撴瀯

    0:120> dd 09a8f66c 
    09a8f66c  09a8f738 09a8f754 09a8f698 77f8f45c 
    09a8f67c  09a8f738 09a8ffdc 09a8f754 09a8f710 
    09a8f68c  09a8ffdc 77f8f5b5 09a8ffdc 09a8f720 
    09a8f69c  77f8f3fa 09a8f738 09a8ffdc 09a8f754 
    09a8f6ac  09a8f710 77e8615b 09a8fad4 00000000 
    09a8f6bc  09a8f738 74a25336 09a8f6e0 09a8f910 
    09a8f6cc  01dc8ad8 0d788918 00000001 018d1f28 
    09a8f6dc  00000001 61746164 7073612e 09a8f71c 
    					
  7. 絎竴涓?DWORD 浠h〃寮傚父璁板綍銆?鑻ヨ鑾峰彇鏈夊叧寮傚父鐨勭被鍨嬩俊鎭紝璇瘋鍦ㄥ懡浠ゆ彁紺虹澶勮繍琛屼互涓嬶細

    .exr first DWORD from step 6

    0:120> .exr 09a8f738 
    ExceptionAddress: 78011f32 (MSVCRT!strnicmp+0x00000092)
       ExceptionCode: c0000005 
      ExceptionFlags: 00000000 
    NumberParameters: 2 
       Parameter[0]: 00000000 
       Parameter[1]: 00000000 
    Attempt to read from address 00000000 
    					
  8. 絎簩涓?DWORD 鏄笂涓嬫枃璁板綍銆?鑻ヨ鑾峰彇涓婁笅鏂囩殑淇℃伅錛岃鍦ㄥ懡浠ゆ彁紺虹澶勮繍琛屼互涓嬶細

    .cxr second DWORD from step 6

    0:120> .cxr 09a8f754 
    eax=027470ff ebx=7803cb28 ecx=00000000 edx=00000000 esi=00000000 edi=09a8fad4 
    eip=78011f32 esp=09a8fa20 ebp=09a8fa2c iopl=0         nv up ei ng nz na po nc 
    cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00010286 
    MSVCRT!strnicmp+92: 
    78011f32 8a06             mov     al,[esi] 
    					
  9. 榪愯 kv 鍛戒護鑾峰緱瀹為檯鐨勫紓甯哥殑璋冪敤鍫嗘爤銆?榪欐湁鍔╀簬鎮ㄨ瘑鍒彲鑳芥湭琚鐞嗘紜殑榪囩▼涓疄闄呴棶棰?

    0:120> kv
    ChildEBP RetAddr  Args to Child            
    WARNING: Stack unwind information not available. Following frames may be wrong.
    09a8fa2c 780119ab 09a8fad4 00000000 09a8faa8 MSVCRT!strnicmp+0x92
    09a8fa40 7801197c 09a8fad4 00000000 6d7044fd MSVCRT!stricmp+0x3c
    09a8fa80 6e5a6ef6 09a8fad4 2193d68d 00e5e298 MSVCRT!stricmp+0xd
    09a8fa94 6d7043bf 09a8fad4 09a8faa8 0000001c IisRTL!CLKRHashTable::FindKey+0x59 (FPO: [2,0,1])
    09a8faac 749fc22d 09a8fad4 01d553b0 0000001c ISATQ!CDirMonitor::FindEntry+0x1e 
    (FPO: [Non-Fpo]) [D:\nt\private\inet\iis\svcs\infocomm\atq\dirmon.cpp @ 884]
    09a8fac4 749fd1cb 09a8fad4 09a8fb10 525c3a46 asp!RegisterASPDirMonitorEntry+0x6e 
    (FPO: [EBP 0x09a8fb08] [2,0,4]) [D:\nt\private\inet\iis\svcs\cmp\asp\aspdmon.cpp @ 534]
    09a8fb08 749fcdd6 00000000 09a8fcbc 018d1f28 asp!CTemplateCacheManager::RegisterTemplateForChangeNotification+0x8a 
    (FPO: [Non-Fpo]) [D:\nt\private\inet\iis\svcs\cmp\asp\cachemgr.cpp @ 621]
    09a8fb3c 74a08bfe 00000000 000000fa 74a30958 asp!CTemplateCacheManager::Load+0x382 
    (FPO: [Non-Fpo]) [D:\nt\private\inet\iis\svcs\cmp\asp\cachemgr.cpp @ 364]
    09a8fc68 74a0d4c9 04c12518 018d1f28 09a8fcbc asp!LoadTemplate+0x42 
    (FPO: [Non-Fpo]) [D:\nt\private\inet\iis\svcs\cmp\asp\exec.cpp @ 1037]
    09a8fcc0 74a2c3e5 00000000 0637ee38 09a8fd58 asp!CHitObj::ViperAsyncCallback+0x3e8 
    (FPO: [Non-Fpo]) [D:\nt\private\inet\iis\svcs\cmp\asp\hitobj.cpp @ 2414]
    09a8fcd8 787c048a 00000000 77aa1b03 01e91ed8 asp!CViperAsyncRequest::OnCall+0x3f 
    (FPO: [Non-Fpo]) [D:\nt\private\inet\iis\svcs\cmp\asp\viperint.cpp @ 194]
    09a8fce0 77aa1b03 01e91ed8 77a536d8 00000000 COMSVCS!STAActivityWorkHelper+0xa 
    (FPO: [1,0,0])
    09a8fd24 77aa1927 000752f8 000864dc 787c0480 ole32!EnterForCallback+0x6a 
    (FPO: [Non-Fpo]) [D:\nt\private\ole32\com\dcomrem\crossctx.cxx @ 1759]
    09a8fe50 77aa17ea 000864dc 787c0480 01e91ed8 ole32!SwitchForCallback+0x12b 
    (FPO: [Non-Fpo]) [D:\nt\private\ole32\com\dcomrem\crossctx.cxx @ 1644]
    09a8fe78 77aa60c1 000864dc 787c0480 01e91ed8 ole32!PerformCallback+0x50
    (FPO: [Non-Fpo]) [D:\nt\private\ole32\com\dcomrem\crossctx.cxx @ 1559]
    09a8fed4 77aa5fa6 04f2b4c0 787c0480 01e91ed8 ole32!CObjectContext::InternalContextCallback+0xf5 
    (FPO: [Non-Fpo]) [D:\nt\private\ole32\com\dcomrem\context.cxx @ 3866]
    09a8fef4 787bd3c3 04f2b4c0 787c0480 01e91ed8 ole32!CObjectContext::DoCallback+0x1a 
    (FPO: [Non-Fpo]) [D:\nt\private\ole32\com\dcomrem\context.cxx @ 3746]
    09a8ff24 787bf373 0216fb3c 00000007 09a8ffec COMSVCS!STAActivityWork::DoWork+0x73 
    (FPO: [0,4,2])
    09a8ffb4 77e8758a 0216fe94 0216fb3c 00000007 COMSVCS!STAThread::STAThreadWorker+0x2bb 
    (FPO: [EBP 0x09a8ffec] [1,31,4])
    09a8ffec 00000000 787bf0b8 0216fe94 00000000 KERNEL32!BaseThreadStart+0x52 
    (FPO: [Non-Fpo]) [D:\nt\private\windows\base\client\support.c @ 451]
    					


jans2002 2009-01-08 15:53 鍙戣〃璇勮
]]>
緙栬瘧boost 1.37閬囧埌鐨勯棶棰?/title><link>http://m.shnenglu.com/jans2002/archive/2008/12/25/70299.html</link><dc:creator>jans2002</dc:creator><author>jans2002</author><pubDate>Thu, 25 Dec 2008 02:08:00 GMT</pubDate><guid>http://m.shnenglu.com/jans2002/archive/2008/12/25/70299.html</guid><wfw:comment>http://m.shnenglu.com/jans2002/comments/70299.html</wfw:comment><comments>http://m.shnenglu.com/jans2002/archive/2008/12/25/70299.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://m.shnenglu.com/jans2002/comments/commentRss/70299.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/jans2002/services/trackbacks/70299.html</trackback:ping><description><![CDATA[<p>铏界劧緗戜笂鍏充簬boost緙栬瘧闂鐨勬枃绔犱竴鍫嗕竴鍫嗙殑錛屼絾鏄埌鎴戜嬌鐢ㄧ殑鏃跺欐庝箞灝變笉琛屽憿錛屾垜鐨勭紪璇戝櫒鏄痸c7.1錛屾湰鏉ヤ笉鎯崇敤boost錛屽彧鏄負浜嗙紪璇慳sio鐨勪緥瀛愶紝寮曠敤浜?/p> <p>#include <boost/date_time/posix_time/posix_time.hpp></p> <p>榪欎釜澶存枃浠訛紝灝辨嫑鏉ヤ簡涓鍫嗙殑闂</p> <p>鎻愮ず閾炬帴閿欒錛?/p> <p>鏂囦歡libboost_date_time-vc71-mt-sgd-1_37.lib鎵句笉鍒?/p> <p>鐒跺悗灝卞紑濮嬩簡婕暱鐨刡oost搴撶紪璇戙?/p> <p>浣嗘槸緙栬瘧瀹屼簡錛屾彁紺鴻繕鏄壘涓嶅埌錛屾垜鏅曘傛煡浜嗘煡sgd鐨勬剰鎬?/p> <p>s:浠h〃static</p> <p>gd:浠h〃璋冭瘯鐗?/p> <p><a >緗戜笂鐨勮娉?/a>鎴戠収鐫鍋氫簡錛屾牴鏈氨涓嶈錛屼笉鐭ラ亾鏄瑪璇憿錛岃繕鏄痓jam鐗堟湰宸茬粡鏇存柊浜嗐傚彧濂芥牴鎹敊璇彁紺猴紝鍦╞oost鐨凧am鏂囦歡涓潵鎻f祴緙栬瘧寮鍏?/p> <p>鍦╔:\boost_1_37_0\tools\build\v2\build鐩綍涓殑build-request.jam鏂囦歡鐨?48琛屾湁</p> <p>feature toolset : gcc msvc borland : implicit ;絳夊唴瀹?/p> <p>鍝︼紝榪欎釜澶ф灝辨槸緙栬瘧寮鍏充簡</p> <p>涓嬮潰鏄紪璇戝嚭闈欐侀摼鎺ョ殑release鐗堟湰</p> <p>bjam toolset=msvc-7.1   runtime-link=static stage </p> <p>涓嬮潰鏄紪璇戝嚭闈欐侀摼鎺ョ殑debug鐗堟湰</p> <p>bjam toolset=msvc-7.1   debug runtime-link=static stage </p> <p>榪欎釜stage寮鍏沖憿錛屽彲鑳藉氨鏄妸緙栬瘧鍑烘潵鐨勬枃浠跺鍒跺埌鐩綍</p> <p>X:\boost_1_37_0\stage\lib </p> <p>鍏跺畠鐨勫紑鍏?/p> <p>rtti:on off</p> <p>optimization: on off</p> <p>絳夌瓑錛?/p><img src ="http://m.shnenglu.com/jans2002/aggbug/70299.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/jans2002/" target="_blank">jans2002</a> 2008-12-25 10:08 <a href="http://m.shnenglu.com/jans2002/archive/2008/12/25/70299.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>澶嶅悎紿楀彛鐨凙ctiveX鎺т歡鍏ㄥ睆鍙婇敭鐩樻秷鎭鐞嗛棶棰?/title><link>http://m.shnenglu.com/jans2002/archive/2008/12/18/69714.html</link><dc:creator>jans2002</dc:creator><author>jans2002</author><pubDate>Thu, 18 Dec 2008 02:29:00 GMT</pubDate><guid>http://m.shnenglu.com/jans2002/archive/2008/12/18/69714.html</guid><wfw:comment>http://m.shnenglu.com/jans2002/comments/69714.html</wfw:comment><comments>http://m.shnenglu.com/jans2002/archive/2008/12/18/69714.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://m.shnenglu.com/jans2002/comments/commentRss/69714.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/jans2002/services/trackbacks/69714.html</trackback:ping><description><![CDATA[<p>鏈榪戝湪寮鍙戜竴涓狝ctiveX瑙嗛鎺т歡錛岄渶瑕佹湁鍏ㄥ睆鍔熻兘錛屽洜涓虹敤鍒板ソ鍑犲眰紿楀彛錛屽湪鍏ㄥ睆鐨勬椂鍊欒垂浜嗗緢澶氬懆鎶橈紝鏈鍚庣瀻鍑戞葷畻鍑戝ソ浜嗭紝鍐欎笅鏉ヤ笌澶у鍏變韓銆?/p> <p>璁╁簲鐢ㄧ▼搴忓叏灞忔樉紺哄叾瀹炴濊礬寰堢畝鍗曪細</p> <p>1.鍏堜繚瀛樿鍏ㄥ睆鐨勭獥鍙g殑鐖剁獥鍙?/p> <p>2.濡傛灉瑕佸叏灞忕殑紿楀彛涓嶆槸瀛愮獥鍙o紝璁劇疆鍏墮鏍間負WS_CHILD</p> <p>3.璁劇疆紿楀彛鐨勭埗紿楀彛涓烘闈?::GetDesktopWindow())</p> <p>4.縐誨姩紿楀彛鑷沖叏灞忥紝騫跺皢紿楀彛璁句負鎬誨湪鏈涓奌WND_TOPMOST</p> <p> </p> <p>m_videoMgr鏄垜鎺т歡閲屽垱寤虹殑瑙嗛紿楀彛錛屽畠鐨勭埗紿楀彛鏄帶浠剁獥鍙?CameraControl)鎺т歡鏈韓鐨勭獥鍙d笉鐩存帴鏄劇ず錛岃榪欎釜m_videoMgr紿楀彛瀹屽叏瑕嗙洊銆傚湪鍏ㄥ睆鐨勬椂鍊欙紝濡傛灉鐩存帴鏇存敼CameraControl鐨勭埗紿楀彛錛屽畠鐨勫瓙紿楀彛m_videoMgr紿楀彛鎬繪槸涓嶈兘姝g‘鐨勮緗負鍏ㄥ睆錛屽彲鑳藉湪鎺т歡嫻嬭瘯瀹瑰櫒閲屾甯革紝浣嗘槸鍒頒簡IE閲屽氨涓嶆甯鎬簡銆備簬鏄垜鏀逛負鏇存敼m_videoMgr紿楀彛鐨勭埗紿楀彛錛屼繚鐣欐帶浠舵湰韜獥鍙o紝浣嗘槸鏀瑰彉紿楀彛澶у皬鐨勬椂鍊欙紝鏀瑰彉鐖剁獥鍙g殑澶у皬錛屼篃璁竚_videoMgr紿楀彛鍙兘鍜屾帶浠舵湰韜獥鍙g殑澶у皬鏈夊叧鑱旓紝榪欐牱鎴愬姛鐨勮繘琛屼簡鍏ㄥ睆錛岃屼笖涓嶇鏄湪IE鍜屾帶浠舵祴璇曞鍣ㄩ噷閮藉彲浠ユ甯哥殑鍏ㄥ睆鍜屾仮澶嶃?/p> <p> </p><pre> <span style="color: #0000ff">if</span>(bFullScreen) { <span style="color: #008000">//鑾峰彇鎺т歡紿楀彛鐨勭粷瀵逛綅緗?/span></pre><pre><span style="color: #008000"> </span>GetWindowRect(m_rcCtrlRect); ::SetParent(m_videoMgr.GetSafeHwnd(),::GetDesktopWindow()); <span style="color: #0000ff">int</span> cx = ::GetSystemMetrics(SM_CXSCREEN); <span style="color: #0000ff">int</span> cy = ::GetSystemMetrics(SM_CYSCREEN); MoveWindow(0, 0, cx, cy); ::SetWindowPos(m_videoMgr.GetSafeHwnd(),HWND_TOPMOST,0,0,cx,cy,SWP_FRAMECHANGED|SWP_DEFERERASE); m_bFullScreen = TRUE; } <span style="color: #0000ff">else</span> { ::SetParent(m_videoMgr.GetSafeHwnd(),m_hWnd); </pre><pre> <span style="color: #008000">//MoveWindow浣跨敤鐩稿紿楀彛鍧愭爣錛屾墍浠ュ繀欏誨厛杞寲涓虹浉瀵瑰潗鏍?/span></pre><pre><span style="color: #008000"></span> CPoint LeftTop(m_rcCtrlRect.TopLeft()); CPoint BottomRight(m_rcCtrlRect.BottomRight()); ::ScreenToClient(m_hWnd,&LeftTop); ::ScreenToClient(m_hWnd,&BottomRight); ::MoveWindow(m_hWnd,LeftTop.x,LeftTop.y,m_rcCtrlRect.Width(),m_rcCtrlRect.Height(),TRUE); ::SetWindowPos(m_videoMgr.GetSafeHwnd(),HWND_NOTOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE); m_bFullScreen = FALSE; } </pre> <p>瑙e喅浜嗕笂闈㈢殑闂涔嬪悗錛屽張鍙戠幇浜嗕竴涓柊鐨勯棶棰橈紝灝辨槸鍏ㄥ睆浠ュ悗鎯充嬌鐢‥sc閿鍑哄叏灞忔椂錛屾牴鏈笉鍝嶅簲閿洏娑堟伅錛屽悗鏉ュ彂鐜癕FC涔熸湁鎺т歡涓嶅鐞嗛敭鐩樻秷鎭殑闂錛屾兂鎯沖彲鑳借窡鎺т歡鐨勭劍鐐規湁鍏崇郴錛屼簬鏄湪FullScreen鐨勪箣鍓嶏紝鍔犱竴涓猄etFocus()</p><pre> <span style="color: #0000ff">if</span>(FullScreen&&!IsFullScreen()) { SetFocus(); OnFullScreen(TRUE); }</pre><pre>鐒跺悗鍙戠幇閿洏娑堟伅澶勭悊姝e父浜嗭紝闂瑙e喅銆?/pre><pre> </pre><img src ="http://m.shnenglu.com/jans2002/aggbug/69714.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/jans2002/" target="_blank">jans2002</a> 2008-12-18 10:29 <a href="http://m.shnenglu.com/jans2002/archive/2008/12/18/69714.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <a href="http://m.shnenglu.com/">青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品</a> <div style="position:fixed;left:-9000px;top:-9000px;"><font id="pjuwb"></font><button id="pjuwb"><pre id="pjuwb"></pre></button><sub id="pjuwb"></sub><tbody id="pjuwb"><var id="pjuwb"><address id="pjuwb"></address></var></tbody><listing id="pjuwb"><label id="pjuwb"><strong id="pjuwb"></strong></label></listing><wbr id="pjuwb"><small id="pjuwb"><tbody id="pjuwb"></tbody></small></wbr><ins id="pjuwb"><xmp id="pjuwb"></xmp></ins><style id="pjuwb"></style><label id="pjuwb"><em id="pjuwb"><li id="pjuwb"></li></em></label><samp id="pjuwb"></samp><menu id="pjuwb"><input id="pjuwb"></input></menu><pre id="pjuwb"><tbody id="pjuwb"><tfoot id="pjuwb"><button id="pjuwb"></button></tfoot></tbody></pre><form id="pjuwb"></form><i id="pjuwb"><style id="pjuwb"><label id="pjuwb"><sup id="pjuwb"></sup></label></style></i><li id="pjuwb"><table id="pjuwb"><abbr id="pjuwb"></abbr></table></li><video id="pjuwb"></video><dfn id="pjuwb"></dfn><progress id="pjuwb"></progress><strong id="pjuwb"></strong><mark id="pjuwb"></mark><em id="pjuwb"></em><tbody id="pjuwb"><p id="pjuwb"><strike id="pjuwb"><acronym id="pjuwb"></acronym></strike></p></tbody><option id="pjuwb"></option><strike id="pjuwb"></strike><u id="pjuwb"></u><td id="pjuwb"><center id="pjuwb"><tr id="pjuwb"></tr></center></td><em id="pjuwb"><mark id="pjuwb"><em id="pjuwb"><tt id="pjuwb"></tt></em></mark></em><strong id="pjuwb"></strong><wbr id="pjuwb"></wbr><s id="pjuwb"></s><strong id="pjuwb"></strong><legend id="pjuwb"></legend><nav id="pjuwb"></nav><dl id="pjuwb"><th id="pjuwb"><dl id="pjuwb"></dl></th></dl><noframes id="pjuwb"><ins id="pjuwb"></ins></noframes><font id="pjuwb"></font><strike id="pjuwb"><i id="pjuwb"><style id="pjuwb"><label id="pjuwb"></label></style></i></strike><output id="pjuwb"></output><thead id="pjuwb"><pre id="pjuwb"></pre></thead><source id="pjuwb"></source><menuitem id="pjuwb"><wbr id="pjuwb"></wbr></menuitem><pre id="pjuwb"><span id="pjuwb"><pre id="pjuwb"><big id="pjuwb"></big></pre></span></pre><cite id="pjuwb"><fieldset id="pjuwb"><s id="pjuwb"><rt id="pjuwb"></rt></s></fieldset></cite><big id="pjuwb"><progress id="pjuwb"><big id="pjuwb"></big></progress></big><samp id="pjuwb"><delect id="pjuwb"></delect></samp><dl id="pjuwb"></dl><strike id="pjuwb"><nav id="pjuwb"><dl id="pjuwb"><strong id="pjuwb"></strong></dl></nav></strike><tbody id="pjuwb"><b id="pjuwb"><optgroup id="pjuwb"><rp id="pjuwb"></rp></optgroup></b></tbody><em id="pjuwb"></em><xmp id="pjuwb"><blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote></xmp> <i id="pjuwb"><abbr id="pjuwb"><i id="pjuwb"><abbr id="pjuwb"></abbr></i></abbr></i><center id="pjuwb"><acronym id="pjuwb"><center id="pjuwb"></center></acronym></center><pre id="pjuwb"></pre><ul id="pjuwb"><thead id="pjuwb"></thead></ul><blockquote id="pjuwb"><pre id="pjuwb"><sup id="pjuwb"></sup></pre></blockquote><acronym id="pjuwb"></acronym><big id="pjuwb"><s id="pjuwb"></s></big><th id="pjuwb"></th><th id="pjuwb"></th><tbody id="pjuwb"></tbody><thead id="pjuwb"><strike id="pjuwb"></strike></thead><th id="pjuwb"><dl id="pjuwb"><wbr id="pjuwb"></wbr></dl></th><dl id="pjuwb"><strong id="pjuwb"></strong></dl><abbr id="pjuwb"><noframes id="pjuwb"><noscript id="pjuwb"></noscript></noframes></abbr><td id="pjuwb"><ol id="pjuwb"></ol></td><li id="pjuwb"><noscript id="pjuwb"><abbr id="pjuwb"></abbr></noscript></li><small id="pjuwb"><bdo id="pjuwb"><nav id="pjuwb"></nav></bdo></small><style id="pjuwb"></style><optgroup id="pjuwb"><table id="pjuwb"></table></optgroup><center id="pjuwb"><tr id="pjuwb"><dfn id="pjuwb"></dfn></tr></center><th id="pjuwb"></th><u id="pjuwb"></u><tfoot id="pjuwb"><legend id="pjuwb"><i id="pjuwb"></i></legend></tfoot><mark id="pjuwb"></mark><meter id="pjuwb"></meter><nav id="pjuwb"></nav><acronym id="pjuwb"><pre id="pjuwb"><acronym id="pjuwb"><ul id="pjuwb"></ul></acronym></pre></acronym><acronym id="pjuwb"><pre id="pjuwb"><acronym id="pjuwb"><ul id="pjuwb"></ul></acronym></pre></acronym><nobr id="pjuwb"></nobr><sub id="pjuwb"><th id="pjuwb"><menuitem id="pjuwb"><wbr id="pjuwb"></wbr></menuitem></th></sub><thead id="pjuwb"><sub id="pjuwb"></sub></thead><ul id="pjuwb"><address id="pjuwb"><menuitem id="pjuwb"><meter id="pjuwb"></meter></menuitem></address></ul><dfn id="pjuwb"></dfn><pre id="pjuwb"></pre><input id="pjuwb"><cite id="pjuwb"><fieldset id="pjuwb"></fieldset></cite></input><u id="pjuwb"><form id="pjuwb"><u id="pjuwb"></u></form></u><kbd id="pjuwb"><em id="pjuwb"><mark id="pjuwb"></mark></em></kbd><tr id="pjuwb"></tr><del id="pjuwb"><form id="pjuwb"><address id="pjuwb"></address></form></del><tfoot id="pjuwb"><legend id="pjuwb"><ol id="pjuwb"><dl id="pjuwb"></dl></ol></legend></tfoot><menu id="pjuwb"><nobr id="pjuwb"><th id="pjuwb"><nobr id="pjuwb"></nobr></th></nobr></menu><fieldset id="pjuwb"></fieldset><pre id="pjuwb"><blockquote id="pjuwb"><samp id="pjuwb"></samp></blockquote></pre><xmp id="pjuwb"><sup id="pjuwb"><pre id="pjuwb"></pre></sup></xmp><span id="pjuwb"><progress id="pjuwb"></progress></span><font id="pjuwb"></font><var id="pjuwb"><abbr id="pjuwb"></abbr></var><strong id="pjuwb"><label id="pjuwb"><i id="pjuwb"><legend id="pjuwb"></legend></i></label></strong><tr id="pjuwb"><em id="pjuwb"><em id="pjuwb"><output id="pjuwb"></output></em></em></tr><thead id="pjuwb"><strike id="pjuwb"></strike></thead> <acronym id="pjuwb"></acronym><i id="pjuwb"></i><tt id="pjuwb"></tt><rt id="pjuwb"><source id="pjuwb"><rt id="pjuwb"></rt></source></rt><strike id="pjuwb"><acronym id="pjuwb"></acronym></strike><del id="pjuwb"></del><font id="pjuwb"><output id="pjuwb"><ins id="pjuwb"><output id="pjuwb"></output></ins></output></font><kbd id="pjuwb"><tr id="pjuwb"><kbd id="pjuwb"></kbd></tr></kbd><pre id="pjuwb"><sup id="pjuwb"><delect id="pjuwb"><samp id="pjuwb"></samp></delect></sup></pre><samp id="pjuwb"></samp><track id="pjuwb"></track><tr id="pjuwb"></tr><center id="pjuwb"></center><fieldset id="pjuwb"></fieldset><i id="pjuwb"></i><td id="pjuwb"></td><rt id="pjuwb"></rt><object id="pjuwb"></object><pre id="pjuwb"><progress id="pjuwb"><sub id="pjuwb"><thead id="pjuwb"></thead></sub></progress></pre><kbd id="pjuwb"><tr id="pjuwb"><option id="pjuwb"></option></tr></kbd><output id="pjuwb"><ins id="pjuwb"></ins></output><ol id="pjuwb"></ol><source id="pjuwb"></source><strong id="pjuwb"></strong><ruby id="pjuwb"></ruby><sub id="pjuwb"><meter id="pjuwb"><menuitem id="pjuwb"><meter id="pjuwb"></meter></menuitem></meter></sub><pre id="pjuwb"></pre><center id="pjuwb"></center><tr id="pjuwb"><tbody id="pjuwb"><xmp id="pjuwb"><dd id="pjuwb"></dd></xmp></tbody></tr><video id="pjuwb"></video><pre id="pjuwb"></pre><form id="pjuwb"><optgroup id="pjuwb"></optgroup></form><samp id="pjuwb"></samp><kbd id="pjuwb"></kbd><strong id="pjuwb"><option id="pjuwb"></option></strong><object id="pjuwb"></object><abbr id="pjuwb"><noframes id="pjuwb"><abbr id="pjuwb"></abbr></noframes></abbr><ul id="pjuwb"><del id="pjuwb"><button id="pjuwb"><pre id="pjuwb"></pre></button></del></ul><abbr id="pjuwb"></abbr><strong id="pjuwb"><code id="pjuwb"><strong id="pjuwb"></strong></code></strong><option id="pjuwb"></option><optgroup id="pjuwb"><bdo id="pjuwb"><code id="pjuwb"></code></bdo></optgroup><mark id="pjuwb"><em id="pjuwb"><font id="pjuwb"></font></em></mark><acronym id="pjuwb"><code id="pjuwb"></code></acronym><dl id="pjuwb"></dl><em id="pjuwb"></em><object id="pjuwb"><input id="pjuwb"><object id="pjuwb"></object></input></object><output id="pjuwb"><dd id="pjuwb"></dd></output><option id="pjuwb"><button id="pjuwb"><option id="pjuwb"></option></button></option><small id="pjuwb"></small></div> <a href="http://www-333304.com" target="_blank">亚洲国产精品毛片</a>| <a href="http://luoliguo.com" target="_blank">亚洲电影免费观看高清完整版在线观看</a>| <a href="http://1313js.com" target="_blank">欧美日韩精品综合在线</a>| <a href="http://4488269.com" target="_blank">久久青草福利网站</a>| <a href="http://65kf.com" target="_blank">欧美国产乱视频</a>| <a href="http://haochen072.com" target="_blank">欧美日韩在线免费</a>| <a href="http://xingda-sh.com" target="_blank">国产精品青草综合久久久久99</a>| <a href="http://56myf.com" target="_blank">国产精品呻吟</a>| <a href="http://www50050.com" target="_blank">亚洲成人资源</a>| <a href="http://dzyhjx.com" target="_blank">亚洲天堂免费在线观看视频</a>| <a href="http://kpd521.com" target="_blank">午夜在线观看免费一区</a>| <a href="http://979695.com" target="_blank">久久蜜桃精品</a>| <a href="http://xian369.com" target="_blank">亚洲伦理在线免费看</a>| <a href="http://nbpacking.com" target="_blank">亚洲欧美日韩网</a>| <a href="http://862323.com" target="_blank">久久蜜臀精品av</a>| <a href="http://ximaimicro.com" target="_blank">欧美图区在线视频</a>| <a href="http://www-5013.com" target="_blank">含羞草久久爱69一区</a>| <a href="http://baixinlocal.com" target="_blank">亚洲乱码国产乱码精品精</a>| <a href="http://874805.com" target="_blank">国内精品久久久久久</a>| <a href="http://hs045.com" target="_blank">亚洲精品专区</a>| <a href="http://387www.com" target="_blank">久久久久9999亚洲精品</a>| <a href="http://wwwjuhuase.com" target="_blank">亚洲精品在线看</a>| <a href="http://188267.com" target="_blank">99精品免费</a>| <a href="http://www-4157.com" target="_blank">欧美一区在线视频</a>| <a href="http://www297777.com" target="_blank">农村妇女精品</a>| <a href="http://5177jy.com" target="_blank">国产伦一区二区三区色一情</a>| <a href="http://xhs1039.com" target="_blank">亚洲精品1区2区</a>| <a href="http://mimi78.com" target="_blank">欧美一区日韩一区</a>| <a href="http://sauske.com" target="_blank">最新亚洲激情</a>| <a href="http://91chaopron.com" target="_blank">久久精品亚洲乱码伦伦中文 </a>| <a href="http://xxxx43.com" target="_blank">亚洲欧美另类久久久精品2019</a>| <a href="http://lmjqav.com" target="_blank">欧美专区在线</a>| <a href="http://5177jy.com" target="_blank">日韩视频一区二区在线观看</a>| <a href="http://avsemm.com" target="_blank">久久久久久伊人</a>| <a href="http://238918.com" target="_blank">国产精品一区视频</a>| <a href="http://www780yy.com" target="_blank">一区二区免费在线观看</a>| <a href="http://yanuoxun.com" target="_blank">欧美freesex8一10精品</a>| <a href="http://dkmcjc.com" target="_blank">亚洲欧美日韩在线观看a三区</a>| <a href="http://136066.com" target="_blank">欧美精品免费看</a>| <a href="http://aqdw2021.com" target="_blank">亚洲国产精品综合</a>| <a href="http://www033459.com" target="_blank">裸体歌舞表演一区二区</a>| <a href="http://www-xj788.com" target="_blank">亚洲女人天堂成人av在线</a>| <a href="http://794238.com" target="_blank">欧美日在线观看</a>| <a href="http://m72722.com" target="_blank">一本色道久久综合</a>| <a href="http://17cao8.com" target="_blank">亚洲电影在线看</a>| <a href="http://www77711.com" target="_blank">久久免费视频观看</a>| <a href="http://maisuper.com" target="_blank">精品不卡在线</a>| <a href="http://azaz7.com" target="_blank">久久蜜桃精品</a>| <a href="http://maomi54.com" target="_blank">久久国产精品一区二区</a>| <a href="http://hjersqc.com" target="_blank">国产午夜精品一区二区三区欧美</a>| <a href="http://9273829.com" target="_blank">亚洲天堂av图片</a>| <a href="http://548710.com" target="_blank">av不卡在线看</a>| <a href="http://www49853b.com" target="_blank">欧美视频导航</a>| <a href="http://hzhzzz.com" target="_blank">亚洲免费视频网站</a>| <a href="http://329aaa.com" target="_blank">一本一本大道香蕉久在线精品</a>| <a href="http://kedou09.com" target="_blank">欧美精品在线视频观看</a>| <a href="http://www89999.com" target="_blank">99精品免费</a>| <a href="http://caopanjia.com" target="_blank">亚洲欧洲免费视频</a>| <a href="http://birhit.com" target="_blank">欧美精品在线观看一区二区</a>| <a href="http://2424ddd.com" target="_blank">亚洲免费观看高清在线观看</a>| <a href="http://456316.com" target="_blank">亚洲国产高清一区</a>| <a href="http://tom3958.com" target="_blank">欧美精品综合</a>| <a href="http://by274.com" target="_blank">亚洲综合日韩在线</a>| <a href="http://gaobb52.com" target="_blank">亚洲嫩草精品久久</a>| <a href="http://ycpeixun.com" target="_blank">国产视频久久久久久久</a>| <a href="http://mgcc37.com" target="_blank">久热国产精品视频</a>| <a href="http://haochen072.com" target="_blank">久久综合狠狠综合久久综合88</a>| <a href="http://fsdashen.com" target="_blank">在线成人中文字幕</a>| <a href="http://917729.com" target="_blank">亚洲国产电影</a>| <a href="http://qmynong.com" target="_blank">国产精品a级</a>| <a href="http://0773ye.com" target="_blank">久久精品中文字幕一区</a>| <a href="http://www77711.com" target="_blank">久久精品国产久精国产一老狼 </a>| <a href="http://916969.com" target="_blank">亚洲一区视频在线</a>| <a href="http://lgcpvip888.com" target="_blank">国产精品一区二区在线观看网站</a>| <a href="http://www8qa.com" target="_blank">久久成人精品一区二区三区</a>| <a href="http://444398.com" target="_blank">久久精品视频播放</a>| <a href="http://7885888.com" target="_blank">亚洲乱码久久</a>| <a href="http://xiaofan123.com" target="_blank">欧美国产高潮xxxx1819</a>| <a href="http://b1768.com" target="_blank">国产日韩欧美一区二区三区在线观看 </a>| <a href="http://fuqiba.com" target="_blank">欧美在线不卡</a>| <a href="http://8135777.com" target="_blank">久久精品麻豆</a>| <a href="http://jyboke.com" target="_blank">亚洲免费电影在线观看</a>| <a href="http://budanbao.com" target="_blank">这里只有精品丝袜</a>| <a href="http://nc04.com" target="_blank">国产主播一区二区</a>| <a href="http://096577.com" target="_blank">亚洲国产精品久久人人爱蜜臀 </a>| <a href="http://vvv3939.com" target="_blank">久久久欧美精品</a>| <a href="http://313cq.com" target="_blank">亚洲精品欧洲精品</a>| <a href="http://wanshunpu.com" target="_blank">一区二区高清在线观看</a>| <a href="http://77777de.com" target="_blank">国产一区二区三区四区hd</a>| <a href="http://showrti.com" target="_blank">欧美大片免费观看</a>| <a href="http://ooonefteprompellets.com" target="_blank">欧美日韩免费网站</a>| <a href="http://oudaole.com" target="_blank">久久综合激情</a>| <a href="http://59jf.com" target="_blank">国产精品久久久久aaaa樱花</a>| <a href="http://555134.com" target="_blank">另类天堂视频在线观看</a>| <a href="http://86808a.com" target="_blank">欧美日韩亚洲一区二区三区在线</a>| <a href="http://94wr.com" target="_blank">久久国产精品久久久久久久久久</a>| <a href="http://anxingou365.com" target="_blank">美女视频黄a大片欧美</a>| <a href="http://by3799.com" target="_blank">性xx色xx综合久久久xx</a>| <a href="http://www-35777.com" target="_blank">欧美xart系列在线观看</a>| <a href="http://anquye16.com" target="_blank">欧美综合77777色婷婷</a>| <a href="http://55555549.com" target="_blank">欧美激情一区二区三区蜜桃视频</a>| <a href="http://sepapapa8888.com" target="_blank">欧美尤物一区</a>| <a href="http://www284tv.com" target="_blank">欧美日韩午夜</a>| <a href="http://qmynong.com" target="_blank">欧美激情一二区</a>| <a href="http://www47011.com" target="_blank">国产一级一区二区</a>| <a href="http://710557.com" target="_blank">亚洲色图自拍</a>| <a href="http://wwwsao117.com" target="_blank">日韩一区二区精品在线观看</a>| <a href="http://yw3328.com" target="_blank">久久精品一区</a>| <a href="http://yp8882.com" target="_blank">欧美资源在线</a>| <a href="http://668www.com" target="_blank">国产精品美女久久久</a>| <a href="http://749996.com" target="_blank">亚洲娇小video精品</a>| <a href="http://xiuren2021.com" target="_blank">国产一区二区精品</a>| <a href="http://77427xyz.com" target="_blank">亚洲一级一区</a>| <a href="http://4kmz.com" target="_blank">一区二区高清在线</a>| <a href="http://www1982t.com" target="_blank">麻豆精品一区二区综合av</a>| <a href="http://354eee.com" target="_blank">欧美一区二区三区免费在线看 </a>| <a href="http://a718sx.com" target="_blank">国产精品久久午夜</a>| <a href="http://sinojinxing.com" target="_blank">欧美国产精品</a>| <a href="http://www37999.com" target="_blank">黄色成人在线</a>| <a href="http://928uc.com" target="_blank">欧美在线播放视频</a>| <a href="http://y08877.com" target="_blank">香蕉成人啪国产精品视频综合网</a>| <a href="http://77xyc77.com" target="_blank">欧美大胆人体视频</a>| <a href="http://yd3399.com" target="_blank">乱人伦精品视频在线观看</a>| <a href="http://4466o.com" target="_blank">国产一区二区欧美</a>| <a href="http://joy-learn.com" target="_blank">亚洲欧美另类国产</a>| <a href="http://tutu80.com" target="_blank">性刺激综合网</a>| <a href="http://1277k.com" target="_blank">国产亚洲va综合人人澡精品</a>| <a href="http://v63xs.com" target="_blank">亚洲欧美日韩国产精品</a>| <a href="http://jiucao8.com" target="_blank">欧美在线观看网站</a>| <a href="http://jnjpsm.com" target="_blank">国产日本欧美一区二区三区在线</a>| <a href="http://411233.com" target="_blank">一区二区av在线</a>| <a href="http://fjnexpo.com" target="_blank">夜夜嗨av色综合久久久综合网</a>| <a href="http://www101804.com" target="_blank">国产亚洲欧美日韩精品</a>| <a href="http://8x29ft.com" target="_blank">亚洲一区久久久</a>| <a href="http://874805.com" target="_blank">香蕉成人伊视频在线观看</a>| <a href="http://www-76577c.com" target="_blank">欧美日韩一区二区三区在线视频</a>| <a href="http://amass-ic.com" target="_blank">亚洲激情电影中文字幕</a>| <a href="http://maisuper.com" target="_blank">亚洲精品在线观看免费</a>| <a href="http://www633998.com" target="_blank">欧美成人自拍视频</a>| <a href="http://88844401.com" target="_blank">亚洲精品国产拍免费91在线</a>| <a href="http://cpddddcc.com" target="_blank">一本色道久久88综合亚洲精品ⅰ </a>| <a href="http://7811c.com" target="_blank">欧美成人免费播放</a>| <a href="http://g2000vip.com" target="_blank">欧美韩日亚洲</a>| <a href="http://7234hh.com" target="_blank">日韩一区二区精品</a>| <a href="http://13751144594.com" target="_blank">欧美视频一区二区三区…</a>| <a href="http://480192.com" target="_blank">一本色道久久加勒比精品</a>| <a href="http://www11111111.com" target="_blank">亚洲小说欧美另类婷婷</a>| <a href="http://cc1024.com" target="_blank">国产精品一级久久久</a>| <a href="http://caoliu2022.com" target="_blank">亚洲欧美一级二级三级</a>| <a href="http://dh03.com" target="_blank">久久亚裔精品欧美</a>| <a href="http://oudaole.com" target="_blank">亚洲片区在线</a>| <a href="http://uniconmgt.com" target="_blank">欧美三区在线观看</a>| <a href="http://nbpacking.com" target="_blank">午夜精品av</a>| <a href="http://xss521.com" target="_blank">欧美韩日高清</a>| <a href="http://6k7a.com" target="_blank">午夜日韩福利</a>| <a href="http://06le.com" target="_blank">精品va天堂亚洲国产</a>| <a href="http://xingmaipet.com" target="_blank">欧美成人精品在线观看</a>| <a href="http://www-00468.com" target="_blank">日韩一级片网址</a>| <a href="http://www-4997.com" target="_blank">久久国产成人</a>| <a href="http://www-49hk.com" target="_blank">91久久在线播放</a>| <a href="http://cswlts.com" target="_blank">欧美特黄一区</a>| <a href="http://www92994.com" target="_blank">久久精品91久久久久久再现</a>| <a href="http://kkwwxx.com" target="_blank">欧美激情视频一区二区三区在线播放 </a>| <a href="http://bocai01.com" target="_blank">国产精品亚洲综合色区韩国</a>| <a href="http://9113i.com" target="_blank">欧美在线视频观看</a>| <a href="http://2225101.com" target="_blank">亚洲三级影院</a>| <a href="http://aaa211.com" target="_blank">久久人人九九</a>| <a href="http://24kshopss.com" target="_blank">宅男精品视频</a>| <a href="http://cn1898.com" target="_blank">国内一区二区三区</a>| <a href="http://yujiaosanye.com" target="_blank">欧美日本网站</a>| <a href="http://mishangmi.com" target="_blank">久久国产黑丝</a>| <a href="http://123086.com" target="_blank">夜夜嗨av一区二区三区免费区 </a>| <a href="http://tt5125.com" target="_blank">午夜精品婷婷</a>| <a href="http://tubcup.com" target="_blank">亚洲高清一区二</a>| <a href="http://016889.com" target="_blank">久久国产精品久久精品国产</a>| <a href="http://tefahsop.com" target="_blank">亚洲国产综合在线看不卡</a>| <a href="http://909059c.com" target="_blank">国产精品久久77777</a>| <a href="http://y4088.com" target="_blank">老司机一区二区三区</a>| <a href="http://www49718.com" target="_blank">亚洲一区二区免费</a>| <a href="http://www-798009.com" target="_blank">亚洲高清不卡一区</a>| <a href="http://456dv.com" target="_blank">久久大逼视频</a>| <a href="http://596361.com" target="_blank">日韩午夜电影在线观看</a>| <a href="http://qq5621.com" target="_blank">国产一区二区三区黄</a>| <a href="http://666cmc.com" target="_blank">欧美日韩亚洲一区二区三区</a>| <a href="http://pktether.com" target="_blank">久久久久久久久久久久久9999</a>| <a href="http://3333347.com" target="_blank">一本色道久久精品</a>| <a href="http://133686.com" target="_blank">亚洲国产1区</a>| <a href="http://551731.com" target="_blank">久久亚洲欧洲</a>| <a href="http://xvideoxxnx.com" target="_blank">欧美亚洲视频在线观看</a>| <a href="http://m10669.com" target="_blank">一本色道**综合亚洲精品蜜桃冫</a>| <a href="http://tefahsop.com" target="_blank">雨宫琴音一区二区在线</a>| <a href="http://chainhuayu.com" target="_blank">国产精品一区久久</a>| <a href="http://491342.com" target="_blank">国产精品成人一区二区</a>| <a href="http://sg-lxs.com" target="_blank">欧美成人亚洲成人日韩成人</a>| <a href="http://97sgg.com" target="_blank">国产精品video</a>| <a href="http://jldianda.com" target="_blank">男男成人高潮片免费网站</a>| <a href="http://ridenimbus.com" target="_blank">午夜精品久久久</a>| <a href="http://gzw33.com" target="_blank">亚洲性视频网址</a>| <a href="http://9927tv.com" target="_blank">亚洲卡通欧美制服中文</a>| <a href="http://884v.com" target="_blank">亚洲国产精品热久久</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>