Avoid setting kClassFlagHasStaticRefs class_flag in temp classes

CMC's compaction implementation cannot easily check if the class is
resolved or not. Therefore, to avoid it from updating static references,
which don't exist, in temp classes, we should avoid setting class_flag
in them so that we skip updating them, thereby avoiding heap corruption.

Bug: 463783526
Flag: EXEMPT BUGFIX
Test: art/test/testrunner/testrunner.py --continuous-gc
Change-Id: I66838ea4f9a505935e5756f09d9c89237e2120d9
2 files changed