diff options
author | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-14 01:06:54 +0000 |
---|---|---|
committer | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-14 01:06:54 +0000 |
commit | dc09efb7dd87597a7e4b5fe790d0ce3a2511380e (patch) | |
tree | a76ae0ed18f12d0f39141fe088d741c6e5fb3b75 | |
parent | 457af8d4fd866e1b40649a15943f9f7329cfcc38 (diff) | |
download | chromium_src-dc09efb7dd87597a7e4b5fe790d0ce3a2511380e.zip chromium_src-dc09efb7dd87597a7e4b5fe790d0ce3a2511380e.tar.gz chromium_src-dc09efb7dd87597a7e4b5fe790d0ce3a2511380e.tar.bz2 |
Added release build assert on attempt to create a RunnableFunction for a function pointer with address 1.
This is actually happening. See http://crbug.com/81449. The generated code to invoke the callback puts the address of the function in the EAX register before doing CALL EAX. I see 0x00000001 in the EAX register when it crashes in the reported minidumps.
I'll revert this after the next Canary.
TEST=run locally and verify no assertion
BUG=81449
Review URL: http://codereview.chromium.org/7013014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85359 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | base/task.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/base/task.h b/base/task.h index 643e418..baec32c 100644 --- a/base/task.h +++ b/base/task.h @@ -449,6 +449,12 @@ class RunnableFunction : public Task { COMPILE_ASSERT( (base::internal::ParamsUseScopedRefptrCorrectly<Params>::value), badrunnablefunctionparams); +#if defined(OS_WIN) + // TODO(apatrick): Remove this ASAP. I think somewhere in the code we're + // posting a task to call a function pointer with this value. Step 1 is + // to find the site it is posted from. http://crbug.com/81449. + CHECK(reinterpret_cast<int>(function) != 0x00000001); +#endif } ~RunnableFunction() { |