Skip to content

The shield is not checked in cool builds #205

@rptb1

Description

@rptb1

Change d82da0e refactored the shield into its own structure, ShieldStruct, which makes sense in terms of abstractions. Various checks that were part of GlobalCheck were moved to the new ShieldCheck and shield checking was then done in the usual way by a CHECKD . The trouble with this change is that ShieldCheck is never reached in normal builds.

There are several problems:

  1. CHECKD does not recurse in a cool (debugging) build, because by default that build uses CheckLevelSHALLOW. This means that ArenaCheck does not invoke ShieldCheck.
  2. Important shield functions such as ShieldEnter take an arena instead of a shield, then check that. But that doesn't invoke ShieldCheck (see above).
  3. We do not regularly run tests with CheckLevelDEEP which would cause CHECKD to recurse.

With several possible solutions:

  1. CHECKD might be the wrong thing for a single-instance inlined structure such as ShieldStruct within ArenaStruct.
  2. Shield functions should take a shield and check it.
  3. We should build and run a deep checking build on at least one platform.

On this last point, a build with make -f lii6ll.gmk VARIETY=cool CFLAGSDEBUG='-O0 -g3 -DCHECKLEVEL=CheckLevelDEEP' testci currently fails in several tests.

This issue was discovered during a walkthrough of e47bc4c04 with @rptb1 and @thejayps .

A similar problem may apply to HistoryStruct introduced by 811d535 and possibly others.

Metadata

Metadata

Assignees

Labels

essentialWill cause failure to meet customer requirements. Assign resources.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions