PR# 14571 Incorporate assertions in runtime_validation.c into runtime

Problem Report Summary
Submitter: prestoat2000
Category: Runtime
Priority: Medium
Date: 2008/07/09
Class: Feature Request
Severity: Serious
Number: 14571
Release: 6.2.73753
Confidential: No
Status: Open
Responsible:
Environment: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.8.1.9) Gecko/20071111 Firefox/2.0.0.9 Solaris 10 on SPARC
Synopsis: Incorporate assertions in runtime_validation.c into runtime

Description
I would like to see the assertions in runtime_validation.c incorporated into
the runtime in the form of a routine that validates assumptions about
alignment, sizes of things, etc.  This routine could be called to verify that
no assumptions are violated.  The assertions would be rewritten as tests that
execute rather than assertions.  Any violations would be displayed and if there
were any violations, the routine would print appropriate error messages and
exit.

Since this `validate' routine would be part of the run-time, it could be called
during runtime initialization, either unconditionally or according to
whether an environment variable (such as EIF_VALIDATE or EIF_VALIDATION)
was set or unset, depending on what you want the default to be.

This would have the advantage of ensuring that all assumptions about alignment
etc are satisfied.  In addition, it would allow us to write an eweasel test so
that we can automate the checking of those assumptions (in case the default
is not to check assumptions and we have to set an environment variable to
force checking).
To Reproduce

										
Problem Report Interactions