Bug 1230910 Obliterate SmartStub FIXME TODO draft
authorTom Ritter <tom@mozilla.com>
Wed, 08 Mar 2017 22:39:10 +0000
changeset 496077 acff88cfc746297784c823a060cefcea94b3a10e
parent 496076 55cb2b746303809d334ca9c8acae8225fdbebd58
child 496078 d55b025d1cbacd503674842ac2de52fe52c738f1
push id48518
push userbmo:tom@mozilla.com
push dateThu, 09 Mar 2017 19:30:51 +0000
bugs1230910
milestone52.0.1
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;