Status: Accepted
Owner: [email protected]
Labels: Type-Bug Priority-Low

New issue 467 by [email protected]: NULL ptr in  
v8::Context::HasOutOfMemoryException
http://code.google.com/p/v8/issues/detail?id=467

The following code that handles OOM seems to crash when the process is OOM
:P. It probably needs to allocate some memory to work, which it can't when
the process is OOM...

bool Context::HasOutOfMemoryException() {
   i::Handle<i::Context> env = Utils::OpenHandle(this);
   return env->has_out_of_memory();
}

Here's some debug output:

*** Start event av(1st)
-- Start info exception
ExceptionAddress: 696eafe0
(chrome_691d0000!v8::Context::HasOutOfMemoryException)
    ExceptionCode: c0000005 (Access violation)
   ExceptionFlags: 00000000
NumberParameters: 2
    Parameter[0]: 00000000
    Parameter[1]: 00000000
Attempt to read from address 00000000
--- End info exception
-- Start info code
chrome_691d0000!v8::Context::HasOutOfMemoryException:
696eafe0 8b09            mov     ecx,dword ptr [ecx]
696eafe2 e8f9cc0300      call
chrome_691d0000!v8::internal::Context::global_context (69727ce0)
696eafe7 8b90b3000000    mov     edx,dword ptr [eax+0B3h]
696eafed 33c9            xor     ecx,ecx
696eafef 3b15509b036a    cmp     edx,dword ptr
[chrome_691d0000!v8::internal::Heap::roots_+0x10 (6a039b50)]
696eaff5 0f94c1          sete    cl
696eaff8 8ac1            mov     al,cl
696eaffa c3              ret
--- End info code
-- Start info process
  0n2652 chrome.exe
--- End info process
-- Start info module
start    end        module name
691d0000 6a21f000   chrome_691d0000 chrome.dll
--- End info module
-- Start info registers
eax=002cf010 ebx=04220400 ecx=00000000 edx=0425b2c0 esi=04265190
edi=00000000 esp=002cf00c ebp=002cf014 eip=696eafe0
--- End info registers
-- Start info stack
ChildEBP RetAddr
002cf008 6994f468
chrome_691d0000!v8::Context::HasOutOfMemoryException(void)
002cf014 6994f5f9
chrome_691d0000!WebCore::V8Proxy::handleOutOfMemory(void)+0x18
002cf030 6994f996 chrome_691d0000!WebCore::V8Proxy::runScript(class
v8::Handle<v8::Script> script = class v8::Handle<v8::Script>, bool
isInlineCode = false)+0xf9
002cf06c 69bcde16 chrome_691d0000!WebCore::V8Proxy::evaluate(class
WebCore::ScriptSourceCode * source = 0x042b7001, class WebCore::Node * node
= 0x042b7018)+0xb6
002cf0a0 69bcdf1f chrome_691d0000!WebCore::ScheduledAction::execute(class
WebCore::V8Proxy * proxy = 0x00000000)+0x96
002cf0b4 6994c0df chrome_691d0000!WebCore::ScheduledAction::execute(class
WebCore::ScriptExecutionContext * context = 0x042c3030)+0x1f
002cf0c4 69ad360f chrome_691d0000!WebCore::DOMTimer::fired(void)+0x5f
002cf0e4 6951f58e
chrome_691d0000!WebCore::ThreadTimers::sharedTimerFiredInternal(void)+0x7f
002cf188 695200da chrome_691d0000!MessageLoop::RunTask(class Task * task =
0x0542fb20)+0x7e
002cf1d8 69547461 chrome_691d0000!MessageLoop::DoWork(void)+0x1ea
002cf288 6951f9c0 chrome_691d0000!base::MessagePumpDefault::Run(class
base::MessagePump::Delegate * delegate = 0x012cf418)+0x111
002cf32c 6951fdf0 chrome_691d0000!MessageLoop::RunInternal(void)+0xc0
002cf360 6952068d chrome_691d0000!MessageLoop::RunHandler(void)+0xa0
002cf37c 6949a3cf chrome_691d0000!MessageLoop::Run(void)+0x3d
002cf598 691d5a32 chrome_691d0000!RendererMain(struct MainFunctionParams *
parameters = 0x002cf680)+0x41f
002cf710 00133a9d chrome_691d0000!ChromeMain(struct HINSTANCE__ * instance
= 0x00130000, union sandbox::SandboxInterfaceInfo * sandbox_info =
0x002cf788, wchar_t * command_line = 0x012dad7c "--
channel=3756.4b24b40.2081916833 --type=renderer --js-flags=--expose-gc --
lang=en-US --force-
fieldtest=AsyncSlowStart/_AsyncSlowStart/DnsImpact/_default_enabled_prefetc
h/GlobalSdch/_global_enable_sdch/SocketLateBinding/_disable_late_binding/")
+0x652
002cf9d4 001598f1 chrome!wWinMain(struct HINSTANCE__ * instance =
0x00130000, struct HINSTANCE__ * prev_instance = 0x00000000, wchar_t *
command_line = 0x012dad7c "--channel=3756.4b24b40.2081916833 --
type=renderer --js-flags=--expose-gc --lang=en-US --force-
fieldtest=AsyncSlowStart/_AsyncSlowStart/DnsImpact/_default_enabled_prefetc
h/GlobalSdch/_global_enable_sdch/SocketLateBinding/_disable_late_binding/",
int __formal = 10)+0x2fd
002cfa6c 75ecd0e9 chrome!__tmainCRTStartup(void)+0x176
002cfa78 772f19bb KERNEL32!BaseThreadInitThunk+0xe
002cfab8 772f198e ntdll!__RtlUserThreadStart+0x23
002cfad0 00000000 ntdll!_RtlUserThreadStart+0x1b
--- End info stack
*** End event av(1st)


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to