projects
/
mono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c8a1007
)
Constructors signatures must be hasthis.
author
Rodrigo Kumpera
<kumpera@gmail.com>
Mon, 18 Oct 2010 19:45:50 +0000
(17:45 -0200)
committer
Rodrigo Kumpera
<kumpera@gmail.com>
Mon, 18 Oct 2010 19:50:22 +0000
(17:50 -0200)
* verify.c (do_newobj): Check if the .ctor signature is
hasthis. Even thou this is not a string 335 requirement
our runtime asserts otherwise.
Fixes #568004
mono/metadata/verify.c
patch
|
blob
|
history
diff --git
a/mono/metadata/verify.c
b/mono/metadata/verify.c
index ab015cc27ce809ec9f07addc72ac90b71a781027..08a4ab6921f8f5fdd6c6aab92e84994eb6d30f75 100644
(file)
--- a/
mono/metadata/verify.c
+++ b/
mono/metadata/verify.c
@@
-3558,6
+3558,11
@@
do_newobj (VerifyContext *ctx, int token)
return;
}
+ if (!sig->hasthis) {
+ ADD_VERIFY_ERROR (ctx, g_strdup_printf ("Invalid constructor signature missing hasthis at 0x%04x", ctx->ip_offset));
+ return;
+ }
+
if (!check_underflow (ctx, sig->param_count))
return;