[J3] [EXTERNAL] Private enumerators

Reuben D. Budiardja reubendb at ornl.gov
Mon Oct 28 13:01:05 EDT 2019


On 10/25/19 4:11 PM, Van Snyder via J3 wrote:
<snipped>

> If typed enumerators had been class (1) names, as BIND(C) enumerators
> are, would you have objected to <access-spec> for them?  Do you object
> to <access-spec> for BIND(C) enumerators?

Note that I don't object to <access-spec> for enumerators (whether they 
are class(1) or class(2). The concern is only for the behavior for 
methods related to private enumerators.

> If you have a public generic interface (or binding) and some (or all) of
> the specific procedures (or bindings) are private, the private ones can
> still be invoked.  Is that a problem?

No, because here the developer choose to expose the private procedures 
(i.e. by creating the generic procedure).

> If a private component appears after (or before) an array component, the
> private component can be accessed by using out-of-bounds subscripts.

Perhaps ... but this requires one possibly knowing the data type of the 
private component and one intentionally trying to exploit some kind of 
vulnerability. I would think this is very different than using a 
"standard-provided way" to get access to private "component" 
(enumerator). Also, with the former, implementation can do things to 
guard against this sort of buffer-overflow attack.

Best,
Reuben


More information about the J3 mailing list