Re: RFR: JDK-8224028: loop initial declarations introduced by JDK-8184770 (jdwp)

2019-05-17 Thread Ao Qi
Hi,

Aleksey has helped to push:
http://hg.openjdk.java.net/jdk/jdk/rev/3205f4c40716. Thank you all!

Cheers,
Ao Qi

On Fri, May 17, 2019 at 8:19 AM David Holmes  wrote:
>
> On 17/05/2019 9:14 am, Martin Buchholz wrote:
> > On Thu, May 16, 2019 at 4:05 PM David Holmes  > > wrote:
> >
> > On 17/05/2019 8:57 am, Martin Buchholz wrote:
> >  > Maybe you just need to ask gcc to use a more modern -std=...
> >  > It might reasonably be defaulting to gnu89
> >  >
> > 
> > https://stackoverflow.com/questions/14737104/what-is-the-default-c-mode-for-the-current-gcc-especially-on-ubuntu
> >
> > Yes, but I thought we'd already done this dance. Solaris was setting a
> > flag to use C89 IIRC and we removed it.
> >
> >
> > A flag to use C89 is obviously bad if you're using features from a later
> > standard.
> > I was suggesting that you could pass gcc -std=gnu99 or -std= c99 (I
> > would go whole hog to C11)
>
> Again I thought we had done this dance. We set -std=gnu++98 but that
> only affects .cpp files. We need a similar thing for .c files. I know
> this has been discussed so I'll see if I can dig up the history and find
> out why we didn't do it. I'll file a build bug if needed.
>
> Cheers,
> David
>
>
> >   $ gcc -v --help |& grep std=.*' C '
> >-std=c11Conform to the ISO 2011 C standard
> >-std=c89Conform to the ISO 1990 C standard
> >-std=c90Conform to the ISO 1990 C standard
> >-std=c99Conform to the ISO 1999 C standard
> >-std=gnu11  Conform to the ISO 2011 C standard with GNU
> >-std=gnu89  Conform to the ISO 1990 C standard with GNU
> >-std=gnu90  Conform to the ISO 1990 C standard with GNU
> >-std=gnu99  Conform to the ISO 1999 C standard with GNU
> >-std=iso9899:1990   Conform to the ISO 1990 C standard
> >-std=iso9899:199409 Conform to the ISO 1990 C standard as
> > amended in
> >-std=iso9899:1999   Conform to the ISO 1999 C standard
> >-std=iso9899:2011   Conform to the ISO 2011 C standard


Re: RFR: JDK-8224028: loop initial declarations introduced by JDK-8184770 (jdwp)

2019-05-16 Thread David Holmes

On 17/05/2019 9:14 am, Martin Buchholz wrote:
On Thu, May 16, 2019 at 4:05 PM David Holmes > wrote:


On 17/05/2019 8:57 am, Martin Buchholz wrote:
 > Maybe you just need to ask gcc to use a more modern -std=...
 > It might reasonably be defaulting to gnu89
 >

https://stackoverflow.com/questions/14737104/what-is-the-default-c-mode-for-the-current-gcc-especially-on-ubuntu

Yes, but I thought we'd already done this dance. Solaris was setting a
flag to use C89 IIRC and we removed it.


A flag to use C89 is obviously bad if you're using features from a later 
standard.
I was suggesting that you could pass gcc -std=gnu99 or -std= c99 (I 
would go whole hog to C11)


Again I thought we had done this dance. We set -std=gnu++98 but that 
only affects .cpp files. We need a similar thing for .c files. I know 
this has been discussed so I'll see if I can dig up the history and find 
out why we didn't do it. I'll file a build bug if needed.


Cheers,
David



  $ gcc -v --help |& grep std=.*' C '
   -std=c11                    Conform to the ISO 2011 C standard
   -std=c89                    Conform to the ISO 1990 C standard
   -std=c90                    Conform to the ISO 1990 C standard
   -std=c99                    Conform to the ISO 1999 C standard
   -std=gnu11                  Conform to the ISO 2011 C standard with GNU
   -std=gnu89                  Conform to the ISO 1990 C standard with GNU
   -std=gnu90                  Conform to the ISO 1990 C standard with GNU
   -std=gnu99                  Conform to the ISO 1999 C standard with GNU
   -std=iso9899:1990           Conform to the ISO 1990 C standard
   -std=iso9899:199409         Conform to the ISO 1990 C standard as 
amended in

   -std=iso9899:1999           Conform to the ISO 1999 C standard
   -std=iso9899:2011           Conform to the ISO 2011 C standard


Re: RFR: JDK-8224028: loop initial declarations introduced by JDK-8184770 (jdwp)

2019-05-16 Thread Martin Buchholz
On Thu, May 16, 2019 at 4:05 PM David Holmes 
wrote:

> On 17/05/2019 8:57 am, Martin Buchholz wrote:
> > Maybe you just need to ask gcc to use a more modern -std=...
> > It might reasonably be defaulting to gnu89
> >
> https://stackoverflow.com/questions/14737104/what-is-the-default-c-mode-for-the-current-gcc-especially-on-ubuntu
>
> Yes, but I thought we'd already done this dance. Solaris was setting a
> flag to use C89 IIRC and we removed it.
>

A flag to use C89 is obviously bad if you're using features from a later
standard.
I was suggesting that you could pass gcc -std=gnu99 or -std= c99 (I would
go whole hog to C11)

 $ gcc -v --help |& grep std=.*' C '
  -std=c11Conform to the ISO 2011 C standard
  -std=c89Conform to the ISO 1990 C standard
  -std=c90Conform to the ISO 1990 C standard
  -std=c99Conform to the ISO 1999 C standard
  -std=gnu11  Conform to the ISO 2011 C standard with GNU
  -std=gnu89  Conform to the ISO 1990 C standard with GNU
  -std=gnu90  Conform to the ISO 1990 C standard with GNU
  -std=gnu99  Conform to the ISO 1999 C standard with GNU
  -std=iso9899:1990   Conform to the ISO 1990 C standard
  -std=iso9899:199409 Conform to the ISO 1990 C standard as amended
in
  -std=iso9899:1999   Conform to the ISO 1999 C standard
  -std=iso9899:2011   Conform to the ISO 2011 C standard


Re: RFR: JDK-8224028: loop initial declarations introduced by JDK-8184770 (jdwp)

2019-05-16 Thread David Holmes

On 17/05/2019 8:57 am, Martin Buchholz wrote:

Maybe you just need to ask gcc to use a more modern -std=...
It might reasonably be defaulting to gnu89
https://stackoverflow.com/questions/14737104/what-is-the-default-c-mode-for-the-current-gcc-especially-on-ubuntu


Yes, but I thought we'd already done this dance. Solaris was setting a 
flag to use C89 IIRC and we removed it.


Cheers,
David

On Thu, May 16, 2019 at 3:25 PM David Holmes > wrote:


On 16/05/2019 11:41 pm, Ao Qi wrote:
 > Hi Serguei,
 >
 > I saw your email [1], but I didn't receive it yet. Thanks for your
 > review! I updated:
 >
 > http://cr.openjdk.java.net/~aoqi/8224028/webrev.01/
 >
 > On Thu, May 16, 2019 at 8:30 PM David Holmes
mailto:david.hol...@oracle.com>> wrote:
 >>
 >> What compiler was used here? We shouldn't be using anything that
doesn't
 >> handle loop variable declarations!
 >
 > The compiler I used is gcc 4.8.5. This machine is used for testing
 > jdk/jdk for months. As far as I remember, loop variable declarations
 > issue never been found. If gcc 4.8.5 is not a supported compiler, I
 > think we should update building doc [2].

I'm surprised the out-of-the-box settings for 4.8.5 result in such an
archaic version of C being supported. I thought we had addressed such
limitations quite a while ago. :(

That said perhaps it is time to bump the minimum gcc level beyond
4.8 ...

Thanks,
David
-

 >>
 >> Thanks,
 >> David
 >>
 >> On 16/05/2019 7:41 pm, Daniel Fuchs wrote:
 >>> Hi Ao Qi,
 >>>
 >>> I'm adding serviceability-dev, since this is for jdwp.
 >>>
 >>> The proposed changes look good to me - but please get
 >>> someone from the serviceability team to review this.
 >
 > Thanks Daniel!
 >
 > Cheers,
 > Ao Qi
 >
 > [1]

https://mail.openjdk.java.net/pipermail/serviceability-dev/2019-May/028097.html
 > [2]

https://hg.openjdk.java.net/jdk/jdk/raw-file/17926213de55/doc/building.html#gcc
 >
 >
 >>>
 >>> best regards,
 >>>
 >>> -- daniel
 >>>
 >>>
 >>> On 16/05/2019 08:41, Ao Qi wrote:
  Hi,
 
  I found build is failed on CentOS 7.6, because of loop initial
  declarations. Could I please get reviews for this?
 
  Bug:
  https://bugs.openjdk.java.net/browse/JDK-8224028
 
  Webrev:
  http://cr.openjdk.java.net/~aoqi/8224028/webrev.00/
 
  Tested:
  linux-x86_64-server-release tier1
 
  Thanks,
  Ao Qi
 
 >>>



Re: RFR: JDK-8224028: loop initial declarations introduced by JDK-8184770 (jdwp)

2019-05-16 Thread Martin Buchholz
Maybe you just need to ask gcc to use a more modern -std=...
It might reasonably be defaulting to gnu89
https://stackoverflow.com/questions/14737104/what-is-the-default-c-mode-for-the-current-gcc-especially-on-ubuntu

On Thu, May 16, 2019 at 3:25 PM David Holmes 
wrote:

> On 16/05/2019 11:41 pm, Ao Qi wrote:
> > Hi Serguei,
> >
> > I saw your email [1], but I didn't receive it yet. Thanks for your
> > review! I updated:
> >
> > http://cr.openjdk.java.net/~aoqi/8224028/webrev.01/
> >
> > On Thu, May 16, 2019 at 8:30 PM David Holmes 
> wrote:
> >>
> >> What compiler was used here? We shouldn't be using anything that doesn't
> >> handle loop variable declarations!
> >
> > The compiler I used is gcc 4.8.5. This machine is used for testing
> > jdk/jdk for months. As far as I remember, loop variable declarations
> > issue never been found. If gcc 4.8.5 is not a supported compiler, I
> > think we should update building doc [2].
>
> I'm surprised the out-of-the-box settings for 4.8.5 result in such an
> archaic version of C being supported. I thought we had addressed such
> limitations quite a while ago. :(
>
> That said perhaps it is time to bump the minimum gcc level beyond 4.8 ...
>
> Thanks,
> David
> -
>
> >>
> >> Thanks,
> >> David
> >>
> >> On 16/05/2019 7:41 pm, Daniel Fuchs wrote:
> >>> Hi Ao Qi,
> >>>
> >>> I'm adding serviceability-dev, since this is for jdwp.
> >>>
> >>> The proposed changes look good to me - but please get
> >>> someone from the serviceability team to review this.
> >
> > Thanks Daniel!
> >
> > Cheers,
> > Ao Qi
> >
> > [1]
> https://mail.openjdk.java.net/pipermail/serviceability-dev/2019-May/028097.html
> > [2]
> https://hg.openjdk.java.net/jdk/jdk/raw-file/17926213de55/doc/building.html#gcc
> >
> >
> >>>
> >>> best regards,
> >>>
> >>> -- daniel
> >>>
> >>>
> >>> On 16/05/2019 08:41, Ao Qi wrote:
>  Hi,
> 
>  I found build is failed on CentOS 7.6, because of loop initial
>  declarations. Could I please get reviews for this?
> 
>  Bug:
>  https://bugs.openjdk.java.net/browse/JDK-8224028
> 
>  Webrev:
>  http://cr.openjdk.java.net/~aoqi/8224028/webrev.00/
> 
>  Tested:
>  linux-x86_64-server-release tier1
> 
>  Thanks,
>  Ao Qi
> 
> >>>
>


Re: RFR: JDK-8224028: loop initial declarations introduced by JDK-8184770 (jdwp)

2019-05-16 Thread David Holmes

On 16/05/2019 11:41 pm, Ao Qi wrote:

Hi Serguei,

I saw your email [1], but I didn't receive it yet. Thanks for your
review! I updated:

http://cr.openjdk.java.net/~aoqi/8224028/webrev.01/

On Thu, May 16, 2019 at 8:30 PM David Holmes  wrote:


What compiler was used here? We shouldn't be using anything that doesn't
handle loop variable declarations!


The compiler I used is gcc 4.8.5. This machine is used for testing
jdk/jdk for months. As far as I remember, loop variable declarations
issue never been found. If gcc 4.8.5 is not a supported compiler, I
think we should update building doc [2].


I'm surprised the out-of-the-box settings for 4.8.5 result in such an 
archaic version of C being supported. I thought we had addressed such 
limitations quite a while ago. :(


That said perhaps it is time to bump the minimum gcc level beyond 4.8 ...

Thanks,
David
-



Thanks,
David

On 16/05/2019 7:41 pm, Daniel Fuchs wrote:

Hi Ao Qi,

I'm adding serviceability-dev, since this is for jdwp.

The proposed changes look good to me - but please get
someone from the serviceability team to review this.


Thanks Daniel!

Cheers,
Ao Qi

[1] 
https://mail.openjdk.java.net/pipermail/serviceability-dev/2019-May/028097.html
[2] 
https://hg.openjdk.java.net/jdk/jdk/raw-file/17926213de55/doc/building.html#gcc




best regards,

-- daniel


On 16/05/2019 08:41, Ao Qi wrote:

Hi,

I found build is failed on CentOS 7.6, because of loop initial
declarations. Could I please get reviews for this?

Bug:
https://bugs.openjdk.java.net/browse/JDK-8224028

Webrev:
http://cr.openjdk.java.net/~aoqi/8224028/webrev.00/

Tested:
linux-x86_64-server-release tier1

Thanks,
Ao Qi





Re: RFR: JDK-8224028: loop initial declarations introduced by JDK-8184770 (jdwp)

2019-05-16 Thread David Holmes

On 17/05/2019 12:26 am, Jean Christophe Beyler wrote:
 From my experience, some compiler in Solaris/Windows complain about 
this (or used to a year ago via the submit repo); Serguei and I had to 
do this dance when we were getting the heap monitoring tests in. An 


I think the tests are different. This file is part of the main build and 
is being built the same way as all the other .c files in the core 
libraries. The Windows and Solaris sources already contain code with 
loop variable declarations. Yet much to my surprise the shared sources 
do not - seems gcc is the weak link here. :(


alternative is to move the file to a C++ file. Adding an extern "C" at 
the top would make symbols not be mangled and it should "work"  without 
having to go to old-C requirements.


Not sure if that's feasible.

Cheers,
David
-


Thanks,
Jc

On Thu, May 16, 2019 at 5:31 AM David Holmes > wrote:


What compiler was used here? We shouldn't be using anything that
doesn't
handle loop variable declarations!

Thanks,
David

On 16/05/2019 7:41 pm, Daniel Fuchs wrote:
 > Hi Ao Qi,
 >
 > I'm adding serviceability-dev, since this is for jdwp.
 >
 > The proposed changes look good to me - but please get
 > someone from the serviceability team to review this.
 >
 > best regards,
 >
 > -- daniel
 >
 >
 > On 16/05/2019 08:41, Ao Qi wrote:
 >> Hi,
 >>
 >> I found build is failed on CentOS 7.6, because of loop initial
 >> declarations. Could I please get reviews for this?
 >>
 >> Bug:
 >> https://bugs.openjdk.java.net/browse/JDK-8224028
 >>
 >> Webrev:
 >> http://cr.openjdk.java.net/~aoqi/8224028/webrev.00/
 >>
 >> Tested:
 >> linux-x86_64-server-release tier1
 >>
 >> Thanks,
 >> Ao Qi
 >>
 >



--

Thanks,
Jc


Re: RFR: JDK-8224028: loop initial declarations introduced by JDK-8184770 (jdwp)

2019-05-16 Thread Ao Qi
On Fri, May 17, 2019 at 12:44 AM serguei.spit...@oracle.com
 wrote:
>
> Hi Ao Qi,
>
> Thank you for the update.
> It looks good to me.

Thanks!

>
> Do you need a sponsor for integration?

Yes:)

>
> Thanks,
> Serguei
>
>
> On 5/16/19 09:38, Alex Menkov wrote:
> >
> >
> > On 05/16/2019 06:41, Ao Qi wrote:
> >> Hi Serguei,
> >>
> >> I saw your email [1], but I didn't receive it yet. Thanks for your
> >> review! I updated:
> >>
> >> http://cr.openjdk.java.net/~aoqi/8224028/webrev.01/
> >
> > Looks good.
> >
> > --alex
> >
> >>
> >> On Thu, May 16, 2019 at 8:30 PM David Holmes
> >>  wrote:
> >>>
> >>> What compiler was used here? We shouldn't be using anything that
> >>> doesn't
> >>> handle loop variable declarations!
> >>
> >> The compiler I used is gcc 4.8.5. This machine is used for testing
> >> jdk/jdk for months. As far as I remember, loop variable declarations
> >> issue never been found. If gcc 4.8.5 is not a supported compiler, I
> >> think we should update building doc [2].
> >>
> >>>
> >>> Thanks,
> >>> David
> >>>
> >>> On 16/05/2019 7:41 pm, Daniel Fuchs wrote:
>  Hi Ao Qi,
> 
>  I'm adding serviceability-dev, since this is for jdwp.
> 
>  The proposed changes look good to me - but please get
>  someone from the serviceability team to review this.
> >>
> >> Thanks Daniel!
> >>
> >> Cheers,
> >> Ao Qi
> >>
> >> [1]
> >> https://mail.openjdk.java.net/pipermail/serviceability-dev/2019-May/028097.html
> >> [2]
> >> https://hg.openjdk.java.net/jdk/jdk/raw-file/17926213de55/doc/building.html#gcc
> >>
> >>
> 
>  best regards,
> 
>  -- daniel
> 
> 
>  On 16/05/2019 08:41, Ao Qi wrote:
> > Hi,
> >
> > I found build is failed on CentOS 7.6, because of loop initial
> > declarations. Could I please get reviews for this?
> >
> > Bug:
> > https://bugs.openjdk.java.net/browse/JDK-8224028
> >
> > Webrev:
> > http://cr.openjdk.java.net/~aoqi/8224028/webrev.00/
> >
> > Tested:
> > linux-x86_64-server-release tier1
> >
> > Thanks,
> > Ao Qi
> >
> 
>


Re: RFR: JDK-8224028: loop initial declarations introduced by JDK-8184770 (jdwp)

2019-05-16 Thread serguei.spit...@oracle.com

Hi Ao Qi,

Thank you for the update.
It looks good to me.

Do you need a sponsor for integration?

Thanks,
Serguei


On 5/16/19 09:38, Alex Menkov wrote:



On 05/16/2019 06:41, Ao Qi wrote:

Hi Serguei,

I saw your email [1], but I didn't receive it yet. Thanks for your
review! I updated:

http://cr.openjdk.java.net/~aoqi/8224028/webrev.01/


Looks good.

--alex



On Thu, May 16, 2019 at 8:30 PM David Holmes 
 wrote:


What compiler was used here? We shouldn't be using anything that 
doesn't

handle loop variable declarations!


The compiler I used is gcc 4.8.5. This machine is used for testing
jdk/jdk for months. As far as I remember, loop variable declarations
issue never been found. If gcc 4.8.5 is not a supported compiler, I
think we should update building doc [2].



Thanks,
David

On 16/05/2019 7:41 pm, Daniel Fuchs wrote:

Hi Ao Qi,

I'm adding serviceability-dev, since this is for jdwp.

The proposed changes look good to me - but please get
someone from the serviceability team to review this.


Thanks Daniel!

Cheers,
Ao Qi

[1] 
https://mail.openjdk.java.net/pipermail/serviceability-dev/2019-May/028097.html
[2] 
https://hg.openjdk.java.net/jdk/jdk/raw-file/17926213de55/doc/building.html#gcc





best regards,

-- daniel


On 16/05/2019 08:41, Ao Qi wrote:

Hi,

I found build is failed on CentOS 7.6, because of loop initial
declarations. Could I please get reviews for this?

Bug:
https://bugs.openjdk.java.net/browse/JDK-8224028

Webrev:
http://cr.openjdk.java.net/~aoqi/8224028/webrev.00/

Tested:
linux-x86_64-server-release tier1

Thanks,
Ao Qi







Re: RFR: JDK-8224028: loop initial declarations introduced by JDK-8184770 (jdwp)

2019-05-16 Thread Alex Menkov




On 05/16/2019 06:41, Ao Qi wrote:

Hi Serguei,

I saw your email [1], but I didn't receive it yet. Thanks for your
review! I updated:

http://cr.openjdk.java.net/~aoqi/8224028/webrev.01/


Looks good.

--alex



On Thu, May 16, 2019 at 8:30 PM David Holmes  wrote:


What compiler was used here? We shouldn't be using anything that doesn't
handle loop variable declarations!


The compiler I used is gcc 4.8.5. This machine is used for testing
jdk/jdk for months. As far as I remember, loop variable declarations
issue never been found. If gcc 4.8.5 is not a supported compiler, I
think we should update building doc [2].



Thanks,
David

On 16/05/2019 7:41 pm, Daniel Fuchs wrote:

Hi Ao Qi,

I'm adding serviceability-dev, since this is for jdwp.

The proposed changes look good to me - but please get
someone from the serviceability team to review this.


Thanks Daniel!

Cheers,
Ao Qi

[1] 
https://mail.openjdk.java.net/pipermail/serviceability-dev/2019-May/028097.html
[2] 
https://hg.openjdk.java.net/jdk/jdk/raw-file/17926213de55/doc/building.html#gcc




best regards,

-- daniel


On 16/05/2019 08:41, Ao Qi wrote:

Hi,

I found build is failed on CentOS 7.6, because of loop initial
declarations. Could I please get reviews for this?

Bug:
https://bugs.openjdk.java.net/browse/JDK-8224028

Webrev:
http://cr.openjdk.java.net/~aoqi/8224028/webrev.00/

Tested:
linux-x86_64-server-release tier1

Thanks,
Ao Qi





Re: RFR: JDK-8224028: loop initial declarations introduced by JDK-8184770 (jdwp)

2019-05-16 Thread Ao Qi
Hi Serguei,

I saw your email [1], but I didn't receive it yet. Thanks for your
review! I updated:

http://cr.openjdk.java.net/~aoqi/8224028/webrev.01/

On Thu, May 16, 2019 at 8:30 PM David Holmes  wrote:
>
> What compiler was used here? We shouldn't be using anything that doesn't
> handle loop variable declarations!

The compiler I used is gcc 4.8.5. This machine is used for testing
jdk/jdk for months. As far as I remember, loop variable declarations
issue never been found. If gcc 4.8.5 is not a supported compiler, I
think we should update building doc [2].

>
> Thanks,
> David
>
> On 16/05/2019 7:41 pm, Daniel Fuchs wrote:
> > Hi Ao Qi,
> >
> > I'm adding serviceability-dev, since this is for jdwp.
> >
> > The proposed changes look good to me - but please get
> > someone from the serviceability team to review this.

Thanks Daniel!

Cheers,
Ao Qi

[1] 
https://mail.openjdk.java.net/pipermail/serviceability-dev/2019-May/028097.html
[2] 
https://hg.openjdk.java.net/jdk/jdk/raw-file/17926213de55/doc/building.html#gcc


> >
> > best regards,
> >
> > -- daniel
> >
> >
> > On 16/05/2019 08:41, Ao Qi wrote:
> >> Hi,
> >>
> >> I found build is failed on CentOS 7.6, because of loop initial
> >> declarations. Could I please get reviews for this?
> >>
> >> Bug:
> >> https://bugs.openjdk.java.net/browse/JDK-8224028
> >>
> >> Webrev:
> >> http://cr.openjdk.java.net/~aoqi/8224028/webrev.00/
> >>
> >> Tested:
> >> linux-x86_64-server-release tier1
> >>
> >> Thanks,
> >> Ao Qi
> >>
> >


Re: RFR: JDK-8224028: loop initial declarations introduced by JDK-8184770 (jdwp)

2019-05-16 Thread David Holmes
What compiler was used here? We shouldn't be using anything that doesn't 
handle loop variable declarations!


Thanks,
David

On 16/05/2019 7:41 pm, Daniel Fuchs wrote:

Hi Ao Qi,

I'm adding serviceability-dev, since this is for jdwp.

The proposed changes look good to me - but please get
someone from the serviceability team to review this.

best regards,

-- daniel


On 16/05/2019 08:41, Ao Qi wrote:

Hi,

I found build is failed on CentOS 7.6, because of loop initial
declarations. Could I please get reviews for this?

Bug:
https://bugs.openjdk.java.net/browse/JDK-8224028

Webrev:
http://cr.openjdk.java.net/~aoqi/8224028/webrev.00/

Tested:
linux-x86_64-server-release tier1

Thanks,
Ao Qi





Re: RFR: JDK-8224028: loop initial declarations introduced by JDK-8184770 (jdwp)

2019-05-16 Thread serguei.spit...@oracle.com

  
  
Hi Ao Qi,
  
  It looks good to me.
  Thank you for taking care about it!
  
  One minor comment on the fragment:
   474 if (mask != NULL) {
 475 if (parseAllowedMask(mask, isIPv4, &(_peers[_peers_cnt].netmask)) != JDWPTRANSPORT_ERROR_NONE) {
 476 _peers_cnt = 0;
 477 fprintf(stderr, "Error in allow option: '%s'\n", mask);
 478 RETURN_ERROR(JDWPTRANSPORT_ERROR_ILLEGAL_ARGUMENT,
 479  "invalid netmask in allow option");
 480 }
 481 // for safety update subnet to satisfy the mask
 482 size_t i;
 483 for (i = 0; i < sizeof(_peers[_peers_cnt].subnet); i++) {
 484 _peers[_peers_cnt].subnet.s6_addr[i] &= _peers[_peers_cnt].netmask.s6_addr[i];
 485 }
   For better compatibility I'd suggest to move the declaration of
  size_t i
   from line 482 to the begin of block after the line 474.
  
  Thanks,
  Serguei
  
  
  On 5/16/19 02:41, Daniel Fuchs wrote:

Hi Ao
  Qi,
  
  
  I'm adding serviceability-dev, since this is for jdwp.
  
  
  The proposed changes look good to me - but please get
  
  someone from the serviceability team to review this.
  
  
  best regards,
  
  
  -- daniel
  
  
  
  On 16/05/2019 08:41, Ao Qi wrote:
  
  Hi,


I found build is failed on CentOS 7.6, because of loop initial

declarations. Could I please get reviews for this?


Bug:

https://bugs.openjdk.java.net/browse/JDK-8224028


Webrev:

http://cr.openjdk.java.net/~aoqi/8224028/webrev.00/


Tested:

linux-x86_64-server-release tier1


Thanks,

Ao Qi


  
  


  



Re: RFR: JDK-8224028: loop initial declarations introduced by JDK-8184770 (jdwp)

2019-05-16 Thread Daniel Fuchs

Hi Ao Qi,

I'm adding serviceability-dev, since this is for jdwp.

The proposed changes look good to me - but please get
someone from the serviceability team to review this.

best regards,

-- daniel


On 16/05/2019 08:41, Ao Qi wrote:

Hi,

I found build is failed on CentOS 7.6, because of loop initial
declarations. Could I please get reviews for this?

Bug:
https://bugs.openjdk.java.net/browse/JDK-8224028

Webrev:
http://cr.openjdk.java.net/~aoqi/8224028/webrev.00/

Tested:
linux-x86_64-server-release tier1

Thanks,
Ao Qi