<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof"><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">Hello,</span></div>
<div class="elementToProof"><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"><br>
</span></div>
<div class="elementToProof"><span style="font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif; color: rgb(0, 0, 0);">Sometimes the size of a </span><span style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; background: var(--neutralPrimarySurface);" class="ContentPasted6">check
point event can be larger than what can fit in an integer (32-bits). Both the JDK and JMC parser read the size field as a compressed long, but casts it to an int. In JMC, see SeekableInputStream:</span><span style="background: var(--neutralPrimarySurface);"></span></div>
<div class="elementToProof"><span style="background: var(--neutralPrimarySurface);"><br>
</span></div>
<div class="elementToProof"><span class="ContentPasted3 ContentPasted4" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; background: var(--neutralPrimarySurface);">int CompressedIntsDataInput::</span><span style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; background: var(--neutralPrimarySurface);">readInt()
throws IOException {</span><br>
</div>
<div class="elementToProof"><span style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; background: var(--neutralPrimarySurface);" class="ContentPasted5">
<div class="ContentPasted5"> return (int) readCompressedLong();</div>
}</span></div>
<div class="elementToProof"><span style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; background: var(--neutralPrimarySurface);" class="ContentPasted5"><br>
</span></div>
<div class="elementToProof"><span style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; background: var(--neutralPrimarySurface);"><span style="background-color:rgb(255, 255, 255);display:inline !important" class="ContentPasted2">ChunkLoaderV1::readConstantPoolEvent(...)</span><br>
</span></div>
<div class="elementToProof"><span style="color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background: var(--neutralPrimarySurface);"><br>
</span></div>
<div class="elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
Today:<span style="background-color:rgb(255, 255, 255);display:inline !important" class="ContentPasted1"></span></div>
<div class="elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<span style="color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">input.readInt(); // size</span></div>
<div class="elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<br>
</div>
<div class="elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
Should be changed to:</div>
<div class="elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<span style="color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">input.readLong(); // size</span><br>
</div>
<div class="elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<br>
</div>
<div class="elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<span style="color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">We are considering bumping the minor version
</span><span style="color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">(a non-breaking change)
</span><span class="ContentPasted7" style="color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; display: inline !important;">of the file format</span><span style="color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">,
but we are not sure if it is necessary as it was already treated as a long value by the JMC parser?</span><br>
</div>
<div class="elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<br>
</div>
<div class="elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
It's more of a problem for the JDK parser, it checks that the number of bytes read matches that of the event size, but since it is already broken for large check point events, a change will not make it more broken. <span style="color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">See
this JDK bug for details:</span></div>
<div class="elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<span style="font-size:12pt;margin:0px;background-color:rgb(255, 255, 255)"><a href="https://bugs.openjdk.org/browse/JDK-8298129" style="margin:0px" class="ContentPasted8">https://bugs.openjdk.org/browse/JDK-8298129</a></span><br>
</div>
<div class="elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<br>
</div>
<div class="elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
This change will not impact the size of ordinary events.</div>
<div class="elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<br>
</div>
<div class="elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<span style="color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">Erik</span></div>
<div class="_Entity _EType_OWALinkPreview _EId_OWALinkPreview _EReadonly_1">
<div id="LPBorder_GTaHR0cHM6Ly9naXRodWIuY29tL29wZW5qZGsvam1jL2Jsb2IvNjgzODdjNWJkNDU0ZmNmNGJkZGEwN2QwY2JlOGQ2ZWI1OWUyYTg0MC9jb3JlL29yZy5vcGVuamRrLmptYy5mbGlnaHRyZWNvcmRlci9zcmMvbWFpbi9qYXZhL29yZy9vcGVuamRrL2ptYy9mbGlnaHRyZWNvcmRlci9pbnRlcm5hbC9wYXJzZXIvdjEvQ2h1bmtMb2FkZXJWMS5qYXZhI0wxMDM." class="LPBorder259339" style="width: 100%; margin-top: 16px; margin-bottom: 16px; position: relative; max-width: 800px; min-width: 424px;">
<table id="LPContainer259339" role="presentation" style="padding: 12px 36px 12px 12px; width: 100%; border: 1px solid rgb(200, 200, 200); border-top-left-radius: 2px; border-top-right-radius: 2px; border-bottom-right-radius: 2px; border-bottom-left-radius: 2px;">
<tbody>
<tr valign="top" style="border-spacing: 0px;">
<td>
<div id="LPImageContainer259339" style="position: relative; margin-right: 12px; height: 120px; overflow: hidden; width: 240px;">
<a target="_blank" id="LPImageAnchor259339" href="https://github.com/openjdk/jmc/blob/68387c5bd454fcf4bdda07d0cbe8d6eb59e2a840/core/org.openjdk.jmc.flightrecorder/src/main/java/org/openjdk/jmc/flightrecorder/internal/parser/v1/ChunkLoaderV1.java#L103"><img id="LPThumbnailImageId259339" alt="" height="120" style="display: block;" width="240" src="https://opengraph.githubassets.com/5bce3a4387800bd74848b1e763ac6ab97f987eba35c7583bb37c8a666782fe3c/openjdk/jmc"></a></div>
</td>
<td style="width: 100%;">
<div id="LPTitle259339" style="font-size: 21px; font-weight: 300; margin-right: 8px; font-family: wf_segoe-ui_light, "Segoe UI Light", "Segoe WP Light", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; margin-bottom: 12px;">
<a target="_blank" id="LPUrlAnchor259339" href="https://github.com/openjdk/jmc/blob/68387c5bd454fcf4bdda07d0cbe8d6eb59e2a840/core/org.openjdk.jmc.flightrecorder/src/main/java/org/openjdk/jmc/flightrecorder/internal/parser/v1/ChunkLoaderV1.java#L103" style="text-decoration: none; color: var(--themePrimary);">jmc/ChunkLoaderV1.java
at 68387c5bd454fcf4bdda07d0cbe8d6eb59e2a840 ยท openjdk/jmc</a></div>
<div id="LPDescription259339" style="font-size: 14px; max-height: 100px; color: rgb(102, 102, 102); font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; margin-bottom: 12px; margin-right: 8px; overflow: hidden;">
Repository for OpenJDK Mission Control, a production time profiling and diagnostics tools suite. https://openjdk.org/projects/jmc - jmc/ChunkLoaderV1.java at 68387c5bd454fcf4bdda07d0cbe8d6eb59e2a84...</div>
<div id="LPMetadata259339" style="font-size: 14px; font-weight: 400; color: rgb(166, 166, 166); font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif;">
github.com</div>
</td>
</tr>
</tbody>
</table>
<div id="LPCloseButtonContainer259339" class="uHkAz" tabindex="0" title="Remove link preview" role="button">
<i data-icon-name="Cancel" aria-hidden="true" id="LPCloseButton259339" class="Rm9Q1 root-172">๎</i></div>
<div id="LPCloseButtonContainer259339" class="uHkAz" tabindex="0" title="Remove link preview" role="button">
<i data-icon-name="Cancel" aria-hidden="true" id="LPCloseButton259339" class="Rm9Q1 root-172">๎</i></div>
<div id="LPCloseButtonContainer259339" class="uHkAz" tabindex="0" title="Remove link preview" role="button">
<i data-icon-name="Cancel" aria-hidden="true" id="LPCloseButton259339" class="Rm9Q1 root-172">๎</i></div>
</div>
</div>
<br>
</body>
</html>