Fix Issue 8301 - Access violation when a big array is allocated

Check that adding array padding doesn't cause overflow
hashOf: unable to compute hash of struct instance with toHash method, if this method cannot be called with this instance:
e.g. non-const toHash with const struct object
Merge pull request #675 from IgorStepanov/hashofstructconst

hashOf: unable to compute hash of struct instance with toHash method, if...
Merge pull request #673 from yebblies/issue8301

Issue 8301 - Access violation when a big array is allocated