<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";}
span.EmailStyle19
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.EmailStyle20
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle21
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle22
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle23
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle24
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Hello,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">PSB.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Leonid Keller [mailto:leonid@mellanox.com]
<br>
<b>Sent:</b> Thursday, October 27, 2011 5:52 AM<br>
<b>To:</b> Smith, Stan; Hefty, Sean<br>
<b>Cc:</b> ofw_list<br>
<b>Subject:</b> RE: opensm 3.3.11 crash<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">What about Vista ?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">(I’m not sure whether it’s relevant for you)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">We are compiling code for Server 2008 with 6001.18001 compiler.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">We got two warnings.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal">[stan]<o:p></o:p></p>
<p class="MsoNormal">I use the compiler from the Windows Driver Kit version 7.1.0 release ‘C:\WinDDK\7600.16385.1’ and compile for win7, Svr2008-R2, Svr2008(wlh) and Vista on x86, x64 & ia64.<o:p></o:p></p>
<p class="MsoNormal">None of the compiles of osm_link_mgr.c show any compilation errors/warnings?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Googling around I see the 6001.1801 compiler is from a much older DDK, around 2009.<o:p></o:p></p>
<p class="MsoNormal">You might want to consider updating your compilation environment (WDK).<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Stan.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">In link_mgr_set_physp_pi() on zero-size memset:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> memset(payload + sizeof(ib_port_info_t), 0,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> IB_SMP_DATA_SIZE - sizeof(ib_port_info_t));<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">( Because after the last changes IB_SMP_DATA_SIZE - sizeof(ib_port_info_t) = 0; )<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:.5in"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">I’ve just removed the memset.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Index: B:/users/leonid/svn/winib/trunk/ulp/opensm/user/opensm/osm_link_mgr.c<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">===================================================================<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">--- B:/users/leonid/svn/winib/trunk/ulp/opensm/user/opensm/osm_link_mgr.c (revision 9050)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+++ B:/users/leonid/svn/winib/trunk/ulp/opensm/user/opensm/osm_link_mgr.c (revision 9051)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">@@ -157,8 +157,6 @@<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> memcpy(payload, p_old_pi, sizeof(ib_port_info_t));<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">- memset(payload + sizeof(ib_port_info_t), 0,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">- IB_SMP_DATA_SIZE - sizeof(ib_port_info_t));<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> /*<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> Should never write back a value that is bigger then 3 in<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Another warnings are in osm_torus.c:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">The warnings I witnessed in compilation osm_torus.c required the cast (bool) in order to get a clean (warnings free compile).<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">The (bool) cast is not in the OFED for Linux code base.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">13>b:\users\leonid\svn\winib\trunk\ulp\opensm\user\opensm\osm_torus.c(1191) : warning C4311: 'type cast' : pointer truncation from 'f_switch *' to 'unsigned int'<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">And some more like that.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">I excluded them with #pragma – didn’t want to change Linux code.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Index: B:/users/leonid/svn/winib/trunk/ulp/opensm/user/opensm/osm_torus.c<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">===================================================================<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">--- B:/users/leonid/svn/winib/trunk/ulp/opensm/user/opensm/osm_torus.c (revision 9078)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+++ B:/users/leonid/svn/winib/trunk/ulp/opensm/user/opensm/osm_torus.c (revision 9079)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">@@ -1188,7 +1188,9 @@<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> port_cnt = osm_node_get_num_physp(osm_node);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> sw_guid = osm_node_get_node_guid(osm_node);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+#pragma warning( disable:4311 )<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> success = (bool)alloc_fswitch(fabric, sw_guid, port_cnt);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+#pragma warning( default:4311 )<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> if (!success)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> goto out;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">@@ -1457,6 +1459,7 @@<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> jp1 = canonicalize(j + 1, t->y_sz);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> kp1 = canonicalize(k + 1, t->z_sz);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+#pragma warning( disable:4311 )<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> fp = set_fp_bit((bool)t->sw[i][j][k], 0, 0, 0);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> fp |= set_fp_bit((bool)t->sw[ip1][j][k], x_sz_gt1, 0, 0);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> fp |= set_fp_bit((bool)t->sw[i][jp1][k], 0, y_sz_gt1, 0);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">@@ -1465,6 +1468,7 @@<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> fp |= set_fp_bit((bool)t->sw[ip1][j][kp1], x_sz_gt1, 0, z_sz_gt1);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> fp |= set_fp_bit((bool)t->sw[i][jp1][kp1], 0, y_sz_gt1, z_sz_gt1);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> fp |= set_fp_bit((bool)t->sw[ip1][jp1][kp1], x_sz_gt1, y_sz_gt1, z_sz_gt1);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+#pragma warning( default:4311 )<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> fp |= x_sz_gt1 << 8;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> fp |= y_sz_gt1 << 9;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">@@ -8789,6 +8793,7 @@<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> return IB_SUCCESS;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+#pragma warning( disable:4311 )<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> static<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> bool good_xy_ring(struct torus *t, const int x, const int y, const int z)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">@@ -8804,6 +8809,7 @@<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> return good_ring;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+#pragma warning( default:4311 )<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> static<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> struct t_switch *find_plane_mid(struct torus *t, const int z)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">@@ -8830,6 +8836,7 @@<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> return NULL;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+#pragma warning( disable:4311 )<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> static<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> struct t_switch *find_stree_root(struct torus *t)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">@@ -8892,6 +8899,7 @@<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> out:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> return root;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">+#pragma warning( default:4311 )<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> static<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> bool sw_in_master_stree(struct t_switch *sw)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Smith, Stan [mailto:stan.smith@intel.com]
<br>
<b>Sent:</b> Monday, October 17, 2011 8:20 PM<br>
<b>To:</b> Leonid Keller; Hefty, Sean<br>
<b>Cc:</b> ofw_list<br>
<b>Subject:</b> RE: opensm 3.3.11 crash<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">No problems Leo; please feel to criticize, I value your insights and experience – all comments are welcome; that’s the way the code gets better!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">I just wanted you to understand you are way ahead of us in win8 testing…<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Stan.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Leonid Keller [mailto:leonid@mellanox.co.il]
<br>
<b>Sent:</b> Monday, October 17, 2011 9:56 AM<br>
<b>To:</b> Smith, Stan; Hefty, Sean<br>
<b>Cc:</b> ofw_list<br>
<b>Subject:</b> RE: opensm 3.3.11 crash<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">Stan, I absolutely didn’t mean to criticize or so.
</span><span style="font-family:Wingdings;color:#1F497D">L</span><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">I know you didn’t work with win8, but even if you did, so what ?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">It was just a bug report with mentioning where it happened.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Because I’m not sure you can reproduce it in win7, for example.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Smith, Stan [mailto:stan.smith@intel.com]
<br>
<b>Sent:</b> Monday, October 17, 2011 6:17 PM<br>
<b>To:</b> Leonid Keller; Hefty, Sean<br>
<b>Cc:</b> ofw_list<br>
<b>Subject:</b> RE: opensm 3.3.11 crash<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">Hi Leo,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> Just so everyone understands, neither Sean nor myself have done any testing on Win8; we are still trying to get winOFED 3.0 out the door…
</span><span style="font-family:Wingdings;color:#1F497D">J</span><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Please continue the win8 reports as it only helps, just understand no one here has walked the win8 path.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Stan.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> ofw-bounces@lists.openfabrics.org [mailto:ofw-bounces@lists.openfabrics.org]
<b>On Behalf Of </b>Leonid Keller<br>
<b>Sent:</b> Monday, October 17, 2011 8:26 AM<br>
<b>To:</b> Hefty, Sean<br>
<b>Cc:</b> ofw_list<br>
<b>Subject:</b> [ofw] opensm 3.3.11 crash<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hi Sean,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">We experienced a crash of opensm in win8.<o:p></o:p></p>
<p class="MsoNormal">The core reason for the crash was that WinMad driver has not started for some reason.<o:p></o:p></p>
<p class="MsoNormal">So libibumad couldn’t work.<o:p></o:p></p>
<p class="MsoNormal">But it had a bug in error flow which caused an access violation.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I bring here two quotes of umad_open_port() function with my comments:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">// umad_open_port<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">…<o:p></o:p></p>
<p class="MsoNormal"> hr = WmGetObject(IID_IWMProvider, (LPVOID*) &ports[portid].prov);<o:p></o:p></p>
<p class="MsoNormal"> if (FAILED(hr)) {<o:p></o:p></p>
<p class="MsoNormal"> CloseHandle(ports[portid].overlap.hEvent);<o:p></o:p></p>
<p class="MsoNormal"> portid = GetLastError() & 0x80000000;<o:p></o:p></p>
<p class="MsoNormal"> goto out;<o:p></o:p></p>
<p class="MsoNormal"> }<o:p></o:p></p>
<p class="MsoNormal"> <span style="background:yellow;mso-highlight:yellow">
// if there is no providers WmGetObject will return error, but portid wil be set to 0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="background:yellow;mso-highlight:yellow"> // We saw it when GetLastError() returned 6. Maybe you mean it to be HRESULT_FROM_WIN32(GetLastError()) ?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="background:yellow;mso-highlight:yellow"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="background:yellow;mso-highlight:yellow"> // As a result umad_open_port() returns 0, i.e. SUCCESS which causes later an access violation</span>.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</div>
</body>
</html>