RFR: 8307160: [REDO] Enable the permissive- flag on the Microsoft Visual C compiler [v2]

Patrick Chen chen.j.patrick at gmail.com
Wed Aug 9 08:20:15 UTC 2023


Can you shut the f

Le mer. 9 août 2023, 10:10, Thomas Stuefe <stuefe at openjdk.org> a écrit :

> On Wed, 9 Aug 2023 06:53:49 GMT, David Holmes <dholmes at openjdk.org> wrote:
>
> >> I wrote this code ages ago. I'm not sure what's weird or suspicious
> about it, though. The comment at the file's beginning explains this code's
> motivation.
> >>
> >> The buffer was never thought to be used for something different than
> HANDLEs or characters, where the assignment of integer literals work. I
> often use char constants for sentinels as debugging aid. As for `'\0'`,
> that indicates to the casual code reader that this is a termination of a
> string, better than had I used a plain 0.
> >
> > Because there is nothing to state what T may be, I found assigning
> character literals to be odd. If T is char and the buffer is meant to be a
> C string then it makes more sense. But for non-char T it just raised
> questions for me.
>
> I see that. We can remove the sentinel stuff, which leaves us with the
> zero termination. Arguably, this could be done by sub classes that derive
> from the char instantiation.
>
> -------------
>
> PR Review Comment:
> https://git.openjdk.org/jdk/pull/15096#discussion_r1288083649
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/security-dev/attachments/20230809/3f64b63e/attachment.htm>


More information about the security-dev mailing list