From 701fb1cf54628338fc668e111ef68c12a497f7de Mon Sep 17 00:00:00 2001 From: Boris Krylov <18525370+FixBo@users.noreply.github.com> Date: Thu, 4 Sep 2025 22:39:25 +0400 Subject: [PATCH 1/3] Increase MAX_METHODS limit in Multicore JIT from 0x4000 to a higher value --- src/coreclr/vm/multicorejitimpl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/vm/multicorejitimpl.h b/src/coreclr/vm/multicorejitimpl.h index 63400e7cb2012d..9d358f542ad70f 100644 --- a/src/coreclr/vm/multicorejitimpl.h +++ b/src/coreclr/vm/multicorejitimpl.h @@ -33,7 +33,7 @@ const unsigned MODULE_MASK = 0xffff; // mask to get module index const unsigned MODULE_LEVEL_OFFSET = 16; // offset of module load level const unsigned MAX_MODULE_LEVELS = 0x100; // maximum allowed number of module levels (2^8 values) -const unsigned MAX_METHODS = 0x4000; // Maximum allowed number of methods (2^14 values) (in principle this is also limited by "unsigned short" counters) +const unsigned MAX_METHODS = 0xffff; // Maximum allowed number of methods (2^16-1 max signature length) const unsigned SIGNATURE_LENGTH_MASK = 0xffff; // mask to get signature from packed data (2^16-1 max signature length) From f0665bf5d327adc6e49e504d87308eaeff60bcdd Mon Sep 17 00:00:00 2001 From: Boris Krylov <18525370+FixBo@users.noreply.github.com> Date: Fri, 5 Sep 2025 07:10:26 +0400 Subject: [PATCH 2/3] correct MAX_METHODS comment --- src/coreclr/vm/multicorejitimpl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/vm/multicorejitimpl.h b/src/coreclr/vm/multicorejitimpl.h index 9d358f542ad70f..ae99c8a338f0bd 100644 --- a/src/coreclr/vm/multicorejitimpl.h +++ b/src/coreclr/vm/multicorejitimpl.h @@ -33,7 +33,7 @@ const unsigned MODULE_MASK = 0xffff; // mask to get module index const unsigned MODULE_LEVEL_OFFSET = 16; // offset of module load level const unsigned MAX_MODULE_LEVELS = 0x100; // maximum allowed number of module levels (2^8 values) -const unsigned MAX_METHODS = 0xffff; // Maximum allowed number of methods (2^16-1 max signature length) +const unsigned MAX_METHODS = 0xffff; // Maximum allowed number of methods (2^16-1 values) const unsigned SIGNATURE_LENGTH_MASK = 0xffff; // mask to get signature from packed data (2^16-1 max signature length) From 39cde3698818db4978ff013a514c1ba6e755b2ea Mon Sep 17 00:00:00 2001 From: Boris Krylov <18525370+FixBo@users.noreply.github.com> Date: Fri, 5 Sep 2025 07:41:40 +0400 Subject: [PATCH 3/3] fix comment --- src/coreclr/vm/multicorejitimpl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/vm/multicorejitimpl.h b/src/coreclr/vm/multicorejitimpl.h index ae99c8a338f0bd..9aeaa7d9bde5ed 100644 --- a/src/coreclr/vm/multicorejitimpl.h +++ b/src/coreclr/vm/multicorejitimpl.h @@ -33,7 +33,7 @@ const unsigned MODULE_MASK = 0xffff; // mask to get module index const unsigned MODULE_LEVEL_OFFSET = 16; // offset of module load level const unsigned MAX_MODULE_LEVELS = 0x100; // maximum allowed number of module levels (2^8 values) -const unsigned MAX_METHODS = 0xffff; // Maximum allowed number of methods (2^16-1 values) +const unsigned MAX_METHODS = 0xffff; // Maximum allowed number of methods (2^16-1 values) (in principle this is also limited by "unsigned short" counters) const unsigned SIGNATURE_LENGTH_MASK = 0xffff; // mask to get signature from packed data (2^16-1 max signature length)