hotspot-dev Digest, Vol 148, Issue 72[Is it suitable to change from strncpy to strcpy?]
Yizun Wang
363263870 at qq.com
Tue Aug 27 14:36:15 UTC 2019
Hi,
Please send this mail to Andrew Hughes, thanks!
To Andrew,
From https://cr.openjdk.java.net/~andrew/openjdk8/8140482/webrev.01/src/share/vm/services/heapDumper.cpp.cdiff.html we can see that you change from strncpy to strcpy. But strcpy is vulnerable to buffer overflow, which may not meet the demand of coverity scan result. So I suggest that you do not change the code.
Sorry for inconvenience.
Regards,
Yizun Wang,
SPD Bank
------------------ Original ------------------
From: "hotspot-dev-request"<hotspot-dev-request at openjdk.java.net>;
Date: Tue, Aug 27, 2019 03:58 PM
To: "hotspot-dev"<hotspot-dev at openjdk.java.net>;
Subject: hotspot-dev Digest, Vol 148, Issue 72
Send hotspot-dev mailing list submissions to
hotspot-dev at openjdk.java.net
To subscribe or unsubscribe via the World Wide Web, visit
https://mail.openjdk.java.net/mailman/listinfo/hotspot-dev
or, via email, send a message with subject or body 'help' to
hotspot-dev-request at openjdk.java.net
You can reach the person managing the list at
hotspot-dev-owner at openjdk.java.net
When replying, please edit your Subject line so it is more specific
than "Re: Contents of hotspot-dev digest..."
Today's Topics:
1. Re: [8u] [RFR] 8140482: Various minor code improvements
(runtime) (Severin Gehwolf)
2. Re: RFR 8229919: Support JNI Critical functions in object
pinning API on x86_32 platforms (Zhengyu Gu)
3. RFR: 8230203: Replace markWord enums with uintptr_t constants
(Stefan Karlsson)
4. RE: RFR [XS]: 8229370: make
jdk/jfr/event/runtime/TestNetworkUtilizationEvent.java more
stable (Baesken, Matthias)
5. Re: RFR [XS]: 8229370: make
jdk/jfr/event/runtime/TestNetworkUtilizationEvent.java more
stable (David Holmes)
----------------------------------------------------------------------
Message: 1
Date: Mon, 26 Aug 2019 16:20:10 +0200
From: Severin Gehwolf <sgehwolf at redhat.com>
To: "Lindenmaier, Goetz" <goetz.lindenmaier at sap.com>, Andrew Hughes
<gnu.andrew at redhat.com>, serviceability-dev
<serviceability-dev at openjdk.java.net>, hotspot-dev
<hotspot-dev at openjdk.java.net>
Subject: Re: [8u] [RFR] 8140482: Various minor code improvements
(runtime)
Message-ID:
<ce9d7a4d74cc3bf6f6b484e9014ba93d6161351f.camel at redhat.com>
Content-Type: text/plain; charset="UTF-8"
Hi,
On Thu, 2018-11-22 at 08:51 +0000, Lindenmaier, Goetz wrote:
> Hi,
>
> Doesn't this have to be posted to jdk8u-dev?
>
> I had a look at the backport.
> Including 7127191 confused me a bit. Is it good to hide the fact that
> this was backported in the repository?
> In os_linux one fix is missing, is this on purpose? I don't think this is a
> critical issue, though, so leaving it out is fine.
>
> > the dropping of the changes to ...
> > src/share/vm/runtime/task.cpp and
> > src/os/windows/vm/attachListener_windows.cpp
> These changes are included in the webrev ...?
>
> The webrev looks good to me.
>
> Best regards,
> Goetz.
>
>
>
>
>
> > -----Original Message-----
> > From: hotspot-dev <hotspot-dev-bounces at openjdk.java.net> On Behalf Of
> > Andrew Hughes
> > Sent: Mittwoch, 21. November 2018 07:45
> > To: serviceability-dev <serviceability-dev at openjdk.java.net>; hotspot-dev
> > <hotspot-dev at openjdk.java.net>
> > Subject: [8u] [RFR] 8140482: Various minor code improvements (runtime)
> >
> > Bug: https://bugs.openjdk.java.net/browse/JDK-8140482
> > Original changeset:
> > https://hg.openjdk.java.net/jdk-updates/jdk9u/hotspot/rev/cd86b5699825
> > Webrev:
> > https://cr.openjdk.java.net/~andrew/openjdk8/8140482/webrev.01/
> >
> > The patch largely applies as is, with some adjustment for context and
> > the dropping of the changes to src/cpu/x86/vm/stubRoutines_x86.cpp,
> > src/share/vm/runtime/task.cpp and
> > src/os/windows/vm/attachListener_windows.cpp
> > which don't exist in 8u. A clean backport of 7127191 is included, which
> > allows the changes to agent/src/os/linux/libproc_impl.c to apply as-is.
> >
> > Applying the change to 8u improves the code quality there and aids
> > in backporting other changes, such as 8210836 [0].
> >
> > Ok for 8u?
> >
> > [0] https://mail.openjdk.java.net/pipermail/serviceability-dev/2018-
> > November/025991.html
> >
> > Thanks,
Reviving this old thread.
Andrew, could you please rebase this patch to latest 8u? AFAIK, 7127191
has been included since in 8u and the review would be easier if the
webrev didn't show it.
I'd need this backport to go in so as to proceed with JDK-8210836.
Thanks,
Severin
------------------------------
Message: 2
Date: Mon, 26 Aug 2019 16:49:01 -0400
From: Zhengyu Gu <zgu at redhat.com>
To: HotSpot Open Source Developers <hotspot-dev at openjdk.java.net>,
shenandoah-dev <shenandoah-dev at openjdk.java.net>
Subject: Re: RFR 8229919: Support JNI Critical functions in object
pinning API on x86_32 platforms
Message-ID: <8cc6bb50-80d1-93da-1601-1f780f2febf4 at redhat.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Passed submit tests.
Thanks,
-Zhengyu
On 8/22/19 2:57 PM, Zhengyu Gu wrote:
> Please review this patch that supports JNI critical functions in object
> pinning capable GCs on x86_32 platforms.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8229919
> Webrev: http://cr.openjdk.java.net/~zgu/JDK-8229919/webrev.00/
>
> Test:
> ? hotspot_gc_shenandoah (fastdebug and release) with 32-bit VM on Linux
> x86_64.
> ? hotspot_gc, hotspot_runtime and hotspot_compiler
> ? Submit tests in progress.
>
> Thanks,
>
> -Zhengyu
------------------------------
Message: 3
Date: Tue, 27 Aug 2019 09:32:33 +0200
From: Stefan Karlsson <stefan.karlsson at oracle.com>
To: hotspot-dev <hotspot-dev at openjdk.java.net>
Subject: RFR: 8230203: Replace markWord enums with uintptr_t constants
Message-ID: <1c706a0b-4be8-9255-74dc-83a0311b4023 at oracle.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Hi all,
Please review this patch to convert the enum constants in markWord into
static const unintptr_t constants.
http://cr.openjdk.java.net/~stefank/8230203/webrev.01/
https://bugs.openjdk.java.net/browse/JDK-8230203
This is a follow-up RFE from the review of JDK-8229258, where a number
of unnecessary casts were pointed out.
There was also a recent bug in this area, JDK-8221725, where Thomas
points out the problem of relying on the bit width of the enum values.
This patch:
1) changes all constants to have the same type as the markWord::_value
field.
2) Removes unnecessary uintptr_t casts
3) Removes uintx casts, because they are typedefed to be uintptr_t
4) Adds explicit casts to (int) when values are negated.
5) Try to only use uintptr_t inside markWord.
6) Leaves the use of intptr_t for parameters and return types of the
different hash functions.
Tested with tier1-3
Thanks,
StefanK
------------------------------
Message: 4
Date: Tue, 27 Aug 2019 07:41:05 +0000
From: "Baesken, Matthias" <matthias.baesken at sap.com>
To: "'hotspot-dev at openjdk.java.net'" <hotspot-dev at openjdk.java.net>,
"hotspot-jfr-dev at openjdk.java.net" <hotspot-jfr-dev at openjdk.java.net>
Subject: RE: RFR [XS]: 8229370: make
jdk/jfr/event/runtime/TestNetworkUtilizationEvent.java more stable
Message-ID:
<AM6PR02MB507849159D0A125C0F3592DE93A00 at AM6PR02MB5078.eurprd02.prod.outlook.com>
Content-Type: text/plain; charset="us-ascii"
Hello, any reviews for this small change ?
Thanks , Matthias
From: Baesken, Matthias
Sent: Montag, 12. August 2019 14:33
To: 'hotspot-dev at openjdk.java.net' <hotspot-dev at openjdk.java.net>; 'hotspot-jfr-dev at openjdk.java.net' <hotspot-jfr-dev at openjdk.java.net>
Subject: RFR [XS]: 8229370: make jdk/jfr/event/runtime/TestNetworkUtilizationEvent.java more stable
Hello, please review this small test enhancement.
We noticed that on some of our Linux machines (SLES12 based) the TestNetworkUtilizationEvent.java test reported just 1 interface
(the test TestNetworkUtilizationEvent.java expects more than 1 on Linux).
Looking into the HS code , os_perf_linux.cpp collects the interfaces + additional information about bytes read/written (by looking at /sys/class/net/eth<X>/statistics/<countername> )
and this info is given to JFR .
However it seems to need (at least on some machines / setups) more packet send operations / potential retries to really get counter updates (and without updates in the counters, no interfaces are found).
So I adjusted the test accordingly.
Bug/webrev :
https://bugs.openjdk.java.net/browse/JDK-8229370
http://cr.openjdk.java.net/~mbaesken/webrevs/8229370.0/
Best regards, Matthias
------------------------------
Message: 5
Date: Tue, 27 Aug 2019 17:55:54 +1000
From: David Holmes <david.holmes at oracle.com>
To: "Baesken, Matthias" <matthias.baesken at sap.com>,
"'hotspot-dev at openjdk.java.net'" <hotspot-dev at openjdk.java.net>,
"hotspot-jfr-dev at openjdk.java.net" <hotspot-jfr-dev at openjdk.java.net>
Subject: Re: RFR [XS]: 8229370: make
jdk/jfr/event/runtime/TestNetworkUtilizationEvent.java more stable
Message-ID: <9f1e22b3-14c9-ecb1-e0b0-d6c19fa02a4e at oracle.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Hi Matthias,
On 27/08/2019 5:41 pm, Baesken, Matthias wrote:
> Hello, any reviews for this small change ?
I missed the initial request - sorry.
Seems we have a double up of effort here as we also have JDK-8228990 for
the exact same problem that we see on some of our test machines.
Our analysis suggests that this test often passes by accident due to
incidental activity on the real network interface when the logic
intended to generate that activity (the packet sent to 10.0.0.0:12345)
actually had no affect (unreachable address). If there is no incidental
network activity then the real network interface is not seen and so the
test fails.
David
> Thanks , Matthias
>
> From: Baesken, Matthias
> Sent: Montag, 12. August 2019 14:33
> To: 'hotspot-dev at openjdk.java.net' <hotspot-dev at openjdk.java.net>; 'hotspot-jfr-dev at openjdk.java.net' <hotspot-jfr-dev at openjdk.java.net>
> Subject: RFR [XS]: 8229370: make jdk/jfr/event/runtime/TestNetworkUtilizationEvent.java more stable
>
> Hello, please review this small test enhancement.
>
> We noticed that on some of our Linux machines (SLES12 based) the TestNetworkUtilizationEvent.java test reported just 1 interface
> (the test TestNetworkUtilizationEvent.java expects more than 1 on Linux).
>
> Looking into the HS code , os_perf_linux.cpp collects the interfaces + additional information about bytes read/written (by looking at /sys/class/net/eth<X>/statistics/<countername> )
> and this info is given to JFR .
>
> However it seems to need (at least on some machines / setups) more packet send operations / potential retries to really get counter updates (and without updates in the counters, no interfaces are found).
> So I adjusted the test accordingly.
>
>
> Bug/webrev :
>
> https://bugs.openjdk.java.net/browse/JDK-8229370
>
> http://cr.openjdk.java.net/~mbaesken/webrevs/8229370.0/
>
>
> Best regards, Matthias
>
End of hotspot-dev Digest, Vol 148, Issue 72
********************************************
More information about the hotspot-dev
mailing list