Bug 1230910 Obliterate SmartStub FIXME TODO draft
authorTom Ritter <tom@mozilla.com>
Wed, 08 Mar 2017 22:39:10 +0000
changeset 656097 0027d78823dfc56b435330886de3c84f63bdb314
parent 656096 b4c69e0b6d374e3aa3fa906ea2d3a019861d5383
child 656098 8629955dbef6634d51f21f71900e5277fba9cb0d
push id77058
push userbmo:tom@mozilla.com
push dateWed, 30 Aug 2017 18:21:00 +0000
bugs1230910
milestone57.0a1
Bug 1230910 Obliterate SmartStub FIXME TODO MozReview-Commit-ID: 5H9Qfrf4zNn
security/sandbox/chromium/sandbox/win/src/sidestep_resolver.cc
--- a/security/sandbox/chromium/sandbox/win/src/sidestep_resolver.cc
+++ b/security/sandbox/chromium/sandbox/win/src/sidestep_resolver.cc
@@ -143,17 +143,18 @@ size_t SmartSidestepResolverThunk::GetTh
 //  [param 2] = first real argument   [param 2] (esp+1c)          [param 2]
 //  [param 1] = our SmartThunk        [param 1] (esp+18)          [ret address]
 //  [ret address] = real caller       [ret address] (esp+14)      [xxx]
 //  [xxx]                             [addr to jump to] (esp+10)  [xxx]
 //  [xxx]                             [saved eax]                 [xxx]
 //  [xxx]                             [saved ebx]                 [xxx]
 //  [xxx]                             [saved ecx]                 [xxx]
 //  [xxx]                             [saved edx]                 [xxx]
-__declspec(naked)
+#if 0
+  __declspec(naked)
 void SmartSidestepResolverThunk::SmartStub() {
   __asm {
     push eax                  // Space for the jump.
     push eax                  // Save registers.
     push ebx
     push ecx
     push edx
     mov ebx, [esp + 0x18]     // First parameter = SmartThunk.
@@ -184,17 +185,20 @@ void SmartSidestepResolverThunk::SmartSt
     mov [esp + 0x10], ecx
     pop edx                             // Restore registers.
     pop ecx
     pop ebx
     pop eax
     ret                                 // Jump to original function.
   }
 }
-
+#else
+void SmartSidestepResolverThunk::SmartStub() {} // FIXME !!!
+#endif
+  
 bool SmartSidestepResolverThunk::IsInternalCall(const void* base,
                                                 void* return_address) {
   DCHECK_NT(base);
   DCHECK_NT(return_address);
 
   base::win::PEImage pe(base);
   if (pe.GetImageSectionFromAddr(return_address))
     return true;