From: monojenkins Date: Mon, 31 Aug 2020 13:12:59 +0000 (-0400) Subject: mono: result of regmask should be stored in regmask_t, not int (#41543) X-Git-Tag: submit/tizen/20210909.063632~5698 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=007a0e9ef2eb6c2cf5c0888e143f25cd7ce3e79e;p=platform%2Fupstream%2Fdotnet%2Fruntime.git mono: result of regmask should be stored in regmask_t, not int (#41543) While unlikely in practice, architectures with more than 32 registers would be affected by this as `sizeof(regmask_t) ==8` && `sizeof(int) == 4`. Run into this while debugging something unrelated. Co-authored-by: skmp --- diff --git a/src/mono/mono/mini/mini-codegen.c b/src/mono/mono/mini/mini-codegen.c index 9fdf040..1894c65 100644 --- a/src/mono/mono/mini/mini-codegen.c +++ b/src/mono/mono/mini/mini-codegen.c @@ -1744,7 +1744,8 @@ mono_local_regalloc (MonoCompile *cfg, MonoBasicBlock *bb) } if (spec [MONO_INST_CLOB] == 'c') { - int j, s, dreg, dreg2, cur_bank; + int j, dreg, dreg2, cur_bank; + regmask_t s; guint64 clob_mask; clob_mask = MONO_ARCH_CALLEE_REGS;