Add additional check for custom array/hash access checking #23399
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PL_check[] can have customized checks for array/hash elements in the
OP_AELEM, OP_EXISTS, and OP_DELETE elements. When these are set, the
multideref optimization is turned off.
It turns out that checking for this always shows that they are not the
standard values on z/OS, because that platform's function pointers may
point to a "function descriptor" and not the actual function, or it may
not. It's not clear to me if this implementation conforms to the C
Standard or not, but it is what it is. As a result our test suite fails
some tests that are expecting non-custom entries in those slots.
This commit builds upon some ideas from Dave Mitchell and Richard Leach
to add 3 entries to the array of function pointers. These entries are
initialized the same way the others are, so that a comparison against
them when no customization has been done should succeed.
The current comparisons are retained, so that it's likely on z/OS one or
the other will succeed when no customization is currently in place.