<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 id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">I recently noticed that a parameter check in MPII_Win_get_attr looks a bit off:</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0"></p>
<div><span style="font-size: 12pt;"></span><span style="font-family: "Courier New",monospace;"></span>            /* A common user error is to pass the address of a 4-byte<br>
             * int when the address of a pointer (or an address-sized int)<br>
             * should have been used.  We can test for this specific<br>
             * case.  Note that this code assumes sizeof(intptr_t) is<br>
             * a power of 2. */<br>
            if ((intptr_t) attribute_val & (sizeof(intptr_t) - 1)) {<br>
                MPIR_ERR_SETANDSTMT(mpi_errno, MPI_ERR_ARG, goto fn_fail, "**attrnotptr");<br>
            }</div>
<p></p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">The comment indicates that the check is testing "attribute_val" to see if a pointer to int was passed in, rather than a double pointer or pointer to an integer that can store an address. But the check seems to only be
 testing for 8 byte alignment (and failing if not aligned). Am I missing something here?<br>
</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<div id="Signature">
<meta content="text/html; charset=UTF-8">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif,"EmojiFont","Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;">
<br>
<div class="OutlineElement Ltr SCXW111908216 BCX2" style="direction:ltr">
<p class="Paragraph SCXW111908216 BCX2" style="font-weight:normal; font-style:normal; vertical-align:baseline; background-color:transparent; color:windowtext; text-align:left; margin-left:0px; margin-right:0px; padding-left:0px; padding-right:0px; text-indent:0px">
<span class="TextRun SCXW111908216 BCX2" style="color:rgb(38,202,211); font-weight:bold; font-size:11pt; font-family:Arial,Arial_MSFontService,sans-serif; line-height:18px" lang="EN-US"><span class="NormalTextRun SCXW111908216 BCX2" style="background-color:inherit">Nick
 Radcliffe  </span></span><span class="TextRun SCXW111908216 BCX2" style="color:rgb(153,140,135); font-size:11pt; font-family:Arial,Arial_MSFontService,sans-serif; line-height:18px" lang="EN-US"><span class="NormalTextRun SCXW111908216 BCX2" style="background-color:inherit">Software
 Engineer</span></span><span class="TextRun SCXW111908216 BCX2" style="color:rgb(153,140,135); font-size:11pt; font-family:Arial,Arial_MSFontService,sans-serif; line-height:18px" lang="EN-US"><span class="NormalTextRun SCXW111908216 BCX2" style="background-color:inherit">
 | Cray Inc.</span></span><span class="EOP SCXW111908216 BCX2" style="font-size:11pt; line-height:18px; font-family:Arial,Arial_MSFontService,sans-serif"> </span></p>
</div>
<div class="OutlineElement Ltr SCXW111908216 BCX2" style="direction:ltr">
<p class="Paragraph SCXW111908216 BCX2" style="font-weight:normal; font-style:normal; vertical-align:baseline; background-color:transparent; color:windowtext; text-align:left; margin-left:0px; margin-right:0px; padding-left:0px; padding-right:0px; text-indent:0px">
<span class="TextRun SCXW111908216 BCX2" style="color:rgb(153,140,135); font-size:11pt; font-family:Arial,Arial_MSFontService,sans-serif; line-height:18px" lang="EN-US"><span class="NormalTextRun SCXW111908216 BCX2" style="background-color:inherit">2131 Lindau
 Ln #1000 </span></span><span class="TextRun SCXW111908216 BCX2" style="color:rgb(153,140,135); font-size:11pt; font-family:Arial,Arial_MSFontService,sans-serif; line-height:18px" lang="EN-US"><span class="NormalTextRun SCXW111908216 BCX2" style="background-color:inherit">|
</span></span><span class="TextRun SCXW111908216 BCX2" style="color:rgb(153,140,135); font-size:11pt; font-family:Arial,Arial_MSFontService,sans-serif; line-height:18px" lang="EN-US"><span class="NormalTextRun SCXW111908216 BCX2" style="background-color:inherit">Bloomington</span></span><span class="TextRun SCXW111908216 BCX2" style="color:rgb(153,140,135); font-size:11pt; font-family:Arial,Arial_MSFontService,sans-serif; line-height:18px" lang="EN-US"><span class="NormalTextRun SCXW111908216 BCX2" style="background-color:inherit">,
</span></span><span class="TextRun SCXW111908216 BCX2" style="color:rgb(153,140,135); font-size:11pt; font-family:Arial,Arial_MSFontService,sans-serif; line-height:18px" lang="EN-US"><span class="NormalTextRun SCXW111908216 BCX2" style="background-color:inherit">MN</span></span><span class="TextRun SCXW111908216 BCX2" style="color:rgb(153,140,135); font-size:11pt; font-family:Arial,Arial_MSFontService,sans-serif; line-height:18px" lang="EN-US"><span class="NormalTextRun SCXW111908216 BCX2" style="background-color:inherit">
</span></span><span class="TextRun SCXW111908216 BCX2" style="color:rgb(153,140,135); font-size:11pt; font-family:Arial,Arial_MSFontService,sans-serif; line-height:18px" lang="EN-US"><span class="NormalTextRun SCXW111908216 BCX2" style="background-color:inherit">55425</span></span><span class="EOP SCXW111908216 BCX2" style="font-size:11pt; line-height:18px; font-family:Arial,Arial_MSFontService,sans-serif"> </span></p>
</div>
<div class="OutlineElement Ltr SCXW111908216 BCX2" style="direction:ltr">
<p class="Paragraph SCXW111908216 BCX2" style="font-weight:normal; font-style:normal; vertical-align:baseline; background-color:transparent; color:windowtext; text-align:left; margin-left:0px; margin-right:0px; padding-left:0px; padding-right:0px; text-indent:0px">
<span class="TextRun SCXW111908216 BCX2" style="color:rgb(153,140,135); font-size:11pt; font-family:Arial,Arial_MSFontService,sans-serif; line-height:18px" lang="EN-US"><span class="NormalTextRun SCXW111908216 BCX2" style="background-color:inherit">+1-</span></span><span class="TextRun SCXW111908216 BCX2" style="color:rgb(153,140,135); font-size:11pt; font-family:Arial,Arial_MSFontService,sans-serif; line-height:18px" lang="EN-US"><span class="NormalTextRun SCXW111908216 BCX2" style="background-color:inherit">651</span></span><span class="TextRun SCXW111908216 BCX2" style="color:rgb(153,140,135); font-size:11pt; font-family:Arial,Arial_MSFontService,sans-serif; line-height:18px" lang="EN-US"><span class="NormalTextRun SCXW111908216 BCX2" style="background-color:inherit">-</span></span><span class="TextRun SCXW111908216 BCX2" style="color:rgb(153,140,135); font-size:11pt; font-family:Arial,Arial_MSFontService,sans-serif; line-height:18px" lang="EN-US"><span class="NormalTextRun SCXW111908216 BCX2" style="background-color:inherit">605</span></span><span class="TextRun SCXW111908216 BCX2" style="color:rgb(153,140,135); font-size:11pt; font-family:Arial,Arial_MSFontService,sans-serif; line-height:18px" lang="EN-US"><span class="NormalTextRun SCXW111908216 BCX2" style="background-color:inherit">-</span></span><span class="TextRun SCXW111908216 BCX2" style="color:rgb(153,140,135); font-size:11pt; font-family:Arial,Arial_MSFontService,sans-serif; line-height:18px" lang="EN-US"><span class="NormalTextRun SCXW111908216 BCX2" style="background-color:inherit">8864</span></span><span class="TextRun SCXW111908216 BCX2" style="color:rgb(153,140,135); font-size:11pt; font-family:Arial,Arial_MSFontService,sans-serif; line-height:18px" lang="EN-US"><span class="NormalTextRun SCXW111908216 BCX2" style="background-color:inherit">  </span></span><span class="TextRun SCXW111908216 BCX2" style="color:rgb(153,140,135); font-size:11pt; font-family:Arial,Arial_MSFontService,sans-serif; line-height:18px" lang="EN-US"><span class="NormalTextRun SCXW111908216 BCX2" style="background-color:inherit">nradclif</span></span><a id="LPNoLP" rel="noreferrer" target="_blank" href="mailto:email@cray.com" class="Hyperlink SCXW111908216 BCX2" style="text-decoration:none; color:inherit"><span class="TextRun Underlined SCXW111908216 BCX2" style="color:rgb(153,140,135); text-decoration:underline; font-size:11pt; font-family:Arial,Arial_MSFontService,sans-serif; line-height:18px" lang="EN-US"><span class="NormalTextRun SCXW111908216 BCX2" style="background-color:inherit">@cray.com</span></span></a><span class="TextRun SCXW111908216 BCX2" style="color:rgb(38,202,211); font-size:11pt; font-family:Arial,Arial_MSFontService,sans-serif; line-height:18px" lang="EN-US"><span class="NormalTextRun SCXW111908216 BCX2" style="background-color:inherit">  </span></span><a id="LPNoLP" title="Ctrl+Click or tap to follow the link" rel="noreferrer" target="_blank" href="http://www.cray.com" class="Hyperlink SCXW111908216 BCX2" style="text-decoration:none; color:inherit"><span class="TextRun Underlined SCXW111908216 BCX2" style="color:rgb(38,202,211); font-weight:bold; text-decoration:underline; font-size:11pt; font-family:Arial,Arial_MSFontService,sans-serif; line-height:18px" lang="EN-US"><span class="NormalTextRun SCXW111908216 BCX2" style="background-color:inherit">www.cray.com</span></span></a></p>
<p></p>
</div>
<div class="OutlineElement Ltr SCXW111908216 BCX2" style="direction:ltr">
<div class="TableContainer SCXW111908216 BCX2"></div>
</div>
</div>
</div>
</div>
</body>
</html>