Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: olcott Newsgroups: comp.theory Subject: Re: DD emulated by HHH cannot possibly terminate normally --- x86 code Date: Sat, 1 Mar 2025 18:36:06 -0600 Organization: A noiseless patient Spider Lines: 85 Message-ID: References: <5c444106eafa1235cc4953d9be6faddf8825bcf3@i2pn2.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Sun, 02 Mar 2025 01:36:09 +0100 (CET) Injection-Info: dont-email.me; posting-host="0a4c634d78a3c572e27d924fefebd45f"; logging-data="495235"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+ISpMhEBpaAmqFYJseF2Yu" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:yyQhsKXiSBsyVPStgpsPBBOU+c4= X-Antivirus: Norton (VPS 250301-6, 3/1/2025), Outbound message X-Antivirus-Status: Clean In-Reply-To: Content-Language: en-US Bytes: 4802 On 3/1/2025 4:08 PM, Fred. Zwarts wrote: > Op 01.mrt.2025 om 22:12 schreef olcott: >> On 3/1/2025 2:22 PM, Fred. Zwarts wrote: >>> Op 01.mrt.2025 om 20:01 schreef olcott: >>>> On 3/1/2025 10:05 AM, Richard Damon wrote: >>>>> On 3/1/25 9:41 AM, olcott wrote: >>>>>> On 3/1/2025 6:49 AM, Richard Damon wrote: >>>>>>> On 2/28/25 7:47 PM, olcott wrote: >>>>>>>> _DD() >>>>>>>> [00002133] 55         push ebp      ; housekeeping >>>>>>>> [00002134] 8bec       mov ebp,esp   ; housekeeping >>>>>>>> [00002136] 51         push ecx      ; make space for local >>>>>>>> [00002137] 6833210000 push 00002133 ; push DD >>>>>>>> [0000213c] e882f4ffff call 000015c3 ; call HHH(DD) >>>>>>>> [00002141] 83c404     add esp,+04 >>>>>>>> [00002144] 8945fc     mov [ebp-04],eax >>>>>>>> [00002147] 837dfc00   cmp dword [ebp-04],+00 >>>>>>>> [0000214b] 7402       jz 0000214f >>>>>>>> [0000214d] ebfe       jmp 0000214d >>>>>>>> [0000214f] 8b45fc     mov eax,[ebp-04] >>>>>>>> [00002152] 8be5       mov esp,ebp >>>>>>>> [00002154] 5d         pop ebp >>>>>>>> [00002155] c3         ret >>>>>>>> Size in bytes:(0035) [00002155] >>>>>>>> >>>>>>>> When we hypothesize that the code at machine address >>>>>>>> 0000213c is an x86 emulator then we know that DD >>>>>>>> remains stuck in recursive emulation and cannot possibly >>>>>>>> reach its own "ret" instruction and terminate normally. >>>>>>>> >>>>>>>> When we add the additional complexity that HHH also >>>>>>>> aborts this sequence at some point then every level >>>>>>>> of recursive emulation immediately stops. This does >>>>>>>> not enable any DD to ever reach its "ret" instruction. >>>>>>>> >>>>>>> >>>>>>> But then you just negated your first assumption, as a partial >>>>>>> emulator that aborts its emulation, then DD no longer gets stuck. >>>>>>> >>>>>> >>>>>> Cannot possibly reach its own "ret" instruction and terminate >>>>>> normally >>>>>> proves non-termination whether aborted or not. >>>>>> >>>>>> Cannot possibly reach its own "ret" instruction and terminate >>>>>> normally >>>>>> proves non-termination whether aborted or not. >>>>>> >>>>>> Cannot possibly reach its own "ret" instruction and terminate >>>>>> normally >>>>>> proves non-termination whether aborted or not. >>>>>> >>>>>> >>>>> >>>>> But it DOES terminate >>>> >>>> DD emulated by HHH never terminates no matter how many >>>> times you try to get away with the straw-man deception >>>> of referring to anything at all besides >>>> >>>> DD EMULATED BY HHH >>>> DD EMULATED BY HHH >>>> DD EMULATED BY HHH >>>> DD EMULATED BY HHH >>>> DD EMULATED BY HHH >>>> DD EMULATED BY HHH >>> HHH emulating DD fails to reach the 'ret' instruction. >> >> Because DD calls HHH(DD) in recursive emulation >> thus non-termination is entirely the fault of DD. > No, DD calls HHH only once. When DD is correctly emulated by HHH and DD calls HHH(DD) then DD calls HHH in recursive emulation. When HHH breaks this otherwise endless chain every level of DD immediately stops with none of them ever reaching their "ret" instruction. It is not that hard when you understand these things and impossible when you don't. -- Copyright 2025 Olcott "Talent hits a target no one else can hit; Genius hits a target no one else can see." Arthur Schopenhauer