<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jan 10, 2018 at 3:01 PM, Sean McBride <span dir="ltr"><<a href="mailto:sean@rogue-research.com" target="_blank">sean@rogue-research.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="m_1393587199834300836gmail-">On Wed, 10 Jan 2018 16:46:51 -0500, Mmanu Chaturvedi said:<br>
<br>
><br>
>On building VTK with UBSan, and running the following test:<br>
><br>
>`ctest -VV -R vtkInteractionWidgetsCxx-TestP<wbr>laneWidget`<br>
><br>
>UBSan produces runtime errors due to the casting done in lines 282 --- 284,<br>
>similar to this:<br>
><br>
>runtime error: value -1.81708e+299 is outside the range of representable<br>
>values of type 'long long'<br>
><br>
>I believe one way to solve the problem would be to do something like the<br>
>following:<br>
><a href="https://gitlab.kitware.com/m-chaturvedi/vtk/commit/" rel="noreferrer" target="_blank">https://gitlab.kitware.com/m-<wbr>chaturvedi/vtk/commit/</a><br>
>4df07e6d3b9bc9250bab74287fb2d<wbr>f3fe1d2098d<br>
><br>
>But this increases the test's time significantly.<br>
><br>
>I was wondering if someone could propose a proper fix.<br>
><br>
>vtkTypeId --<br>
><a href="https://gitlab.kitware.com/m-chaturvedi/vtk/blob/master/Common/Core/" rel="noreferrer" target="_blank">https://gitlab.kitware.com/m-<wbr>chaturvedi/vtk/blob/master/Com<wbr>mon/Core/</a><br>
>vtkType.h#L328<br>
<br>
</span>This gives me deja vu... I believe this is related:<br>
<br>
<<a href="https://gitlab.kitware.com/vtk/vtk/merge_requests/2578" rel="noreferrer" target="_blank">https://gitlab.kitware.com/vt<wbr>k/vtk/merge_requests/2578</a>><br></blockquote><div><br></div><div>Indeed it is related, and this is a really ugly problem.  It causes incorrect</div><div>results from vtkPointSet::FindCell(), which is called by many VTK filters.</div><div><br></div><div> - David</div></div><br></div></div>