Many tests fail under UBSan due to misaligned address use in vtkDataSetRegionSurfaceFilter and vtkDataSetSurfaceFilter.
Many tests fail under UBSan due to misaligned address use in vtkDataSetRegionSurfaceFilter and vtkDataSetSurfaceFilter.
ex: VTK::FiltersGeneralPython-clipVolume
* thread #1, name = 'main thread', queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
frame #0: 0x0000000114aa3dc6 libvtkFiltersGeometry-9.2.9.2.6.dylib`vtkDataSetSurfaceFilter::NewFastGeomQuad(this=0x000061300004c400, numPts=3) at vtkDataSetSurfaceFilter.cxx:2592:6
2589
2590 vtkFastGeomQuad* q = reinterpret_cast<vtkFastGeomQuad*>(
2591 this->FastGeomQuadArrays[this->NextArrayIndex] + this->NextQuadIndex);
-> 2592 q->numPts = numPts;
2593
2594 const int qsize = sizeof(vtkFastGeomQuad);
2595 const int sizeId = sizeof(vtkIdType);
Target 0: (vtkpython) stopped.
(lldb) p q
(vtkFastGeomQuad *) $0 = 0x0000631000050824
(lldb) bt
* thread #1, name = 'main thread', queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
* frame #0: 0x0000000114aa3dc6 libvtkFiltersGeometry-9.2.9.2.6.dylib`vtkDataSetSurfaceFilter::NewFastGeomQuad(this=0x000061300004c400, numPts=3) at vtkDataSetSurfaceFilter.cxx:2592:6
frame #1: 0x0000000114aa4a81 libvtkFiltersGeometry-9.2.9.2.6.dylib`vtkDataSetSurfaceFilter::InsertTriInHash(this=0x000061300004c400, a=0, b=2, c=1, sourceId=0, (null)=3) at vtkDataSetSurfaceFilter.cxx:2381:16
frame #2: 0x0000000114a8c169 libvtkFiltersGeometry-9.2.9.2.6.dylib`vtkDataSetSurfaceFilter::UnstructuredGridExecuteInternal(this=0x000061300004c400, input=0x000061700015eb00, output=0x000061500001fe80, handleSubdivision=false) at vtkDataSetSurfaceFilter.cxx:1711:15
frame #3: 0x0000000114a809ef libvtkFiltersGeometry-9.2.9.2.6.dylib`vtkDataSetSurfaceFilter::UnstructuredGridExecute(this=0x000061300004c400, dataSetInput=0x000061700015eb00, output=0x000061500001fe80, info=0x000060200004feb0) at vtkDataSetSurfaceFilter.cxx:1355:16
frame #4: 0x0000000114a8040f libvtkFiltersGeometry-9.2.9.2.6.dylib`vtkDataSetSurfaceFilter::UnstructuredGridExecute(this=0x000061300004c400, dataSetInput=0x000061700015eb00, output=0x000061500001fe80) at vtkDataSetSurfaceFilter.cxx:1309:20
frame #5: 0x0000000114a5235c libvtkFiltersGeometry-9.2.9.2.6.dylib`vtkDataSetSurfaceFilter::RequestData(this=0x000061300004c400, (null)=0x00006080000ccca0, inputVector=0x000060200004f970, outputVector=0x00006080000cc9a0) at vtkDataSetSurfaceFilter.cxx:423:13
frame #6: 0x00000001051aaf78 libvtkCommonExecutionModel-9.2.9.2.6.dylib`vtkPolyDataAlgorithm::ProcessRequest(this=0x000061300004c400, request=0x00006080000ccca0, inputVector=0x000060200004f970, outputVector=0x00006080000cc9a0) at vtkPolyDataAlgorithm.cxx:88:18
frame #7: 0x00000001050a1d00 libvtkCommonExecutionModel-9.2.9.2.6.dylib`vtkExecutive::CallAlgorithm(this=0x000061100005a2c0, request=0x00006080000ccca0, direction=1, inInfo=0x000060200004f970, outInfo=0x00006080000cc9a0) at vtkExecutive.cxx:735:33
frame #8: 0x00000001050780bf libvtkCommonExecutionModel-9.2.9.2.6.dylib`vtkDemandDrivenPipeline::ExecuteData(this=0x000061100005a2c0, request=0x00006080000ccca0, inInfo=0x000060200004f970, outInfo=0x00006080000cc9a0) at vtkDemandDrivenPipeline.cxx:462:22
frame #9: 0x0000000105044857 libvtkCommonExecutionModel-9.2.9.2.6.dylib`vtkCompositeDataPipeline::ExecuteData(this=0x000061100005a2c0, request=0x00006080000ccca0, inInfoVec=0x000060200004f970, outInfoVec=0x00006080000cc9a0) at vtkCompositeDataPipeline.cxx:163:32
frame #10: 0x0000000105075986 libvtkCommonExecutionModel-9.2.9.2.6.dylib`vtkDemandDrivenPipeline::ProcessRequest(this=0x000061100005a2c0, request=0x00006080000ccca0, inInfoVec=0x000060200004f970, outInfoVec=0x00006080000cc9a0) at vtkDemandDrivenPipeline.cxx:261:22
frame #11: 0x0000000105434f42 libvtkCommonExecutionModel-9.2.9.2.6.dylib`vtkStreamingDemandDrivenPipeline::ProcessRequest(this=0x000061100005a2c0, request=0x00006080000ccca0, inInfoVec=0x000060200004f970, outInfoVec=0x00006080000cc9a0) at vtkStreamingDemandDrivenPipeline.cxx:344:27
frame #12: 0x00000001050779c2 libvtkCommonExecutionModel-9.2.9.2.6.dylib`vtkDemandDrivenPipeline::UpdateData(this=0x000061100005a2c0, outputPort=0) at vtkDemandDrivenPipeline.cxx:419:16
frame #13: 0x0000000105435a04 libvtkCommonExecutionModel-9.2.9.2.6.dylib`vtkStreamingDemandDrivenPipeline::Update(this=0x000061100005a2c0, port=0, requests=0x0000000000000000) at vtkStreamingDemandDrivenPipeline.cxx:418:34
frame #14: 0x00000001054355b2 libvtkCommonExecutionModel-9.2.9.2.6.dylib`vtkStreamingDemandDrivenPipeline::Update(this=0x000061100005a2c0, port=0) at vtkStreamingDemandDrivenPipeline.cxx:381:16
frame #15: 0x000000010500ffef libvtkCommonExecutionModel-9.2.9.2.6.dylib`vtkAlgorithm::Update(this=0x000061300004c400, port=0) at vtkAlgorithm.cxx:1492:25
frame #16: 0x000000010500fefb libvtkCommonExecutionModel-9.2.9.2.6.dylib`vtkAlgorithm::Update(this=0x000061300004c400) at vtkAlgorithm.cxx:1486:9
frame #17: 0x00000001508fcd9c libvtkRenderingOpenGL2-9.2.9.2.6.dylib`vtkOpenGLPolyDataMapper::RenderPiece(this=0x000061b0000e7e80, ren=0x000061b0000b2880, actor=0x0000616000050a80) at vtkOpenGLPolyDataMapper.cxx:3563:32
frame #18: 0x000000010ff52e79 libvtkRenderingCore-9.2.9.2.6.dylib`vtkPolyDataMapper::Render(this=0x000061b0000e7e80, ren=0x000061b0000b2880, act=0x0000616000050a80) at vtkPolyDataMapper.cxx:66:11
frame #19: 0x000000010fb70a20 libvtkRenderingCore-9.2.9.2.6.dylib`vtkDataSetMapper::Render(this=0x0000615000002100, ren=0x000061b0000b2880, act=0x0000616000050a80) at vtkDataSetMapper.cxx:157:25
frame #20: 0x00000001505bd2d8 libvtkRenderingOpenGL2-9.2.9.2.6.dylib`vtkOpenGLActor::Render(this=0x0000616000050a80, ren=0x000061b0000b2880, mapper=0x0000615000002100) at vtkOpenGLActor.cxx:105:11
frame #21: 0x000000010f8e6a3d libvtkRenderingCore-9.2.9.2.6.dylib`vtkActor::RenderOpaqueGeometry(this=0x0000616000050a80, vp=0x000061b0000b2880) at vtkActor.cxx:231:11
frame #22: 0x00000001100bd16c libvtkRenderingCore-9.2.9.2.6.dylib`vtkRenderer::UpdateOpaquePolygonalGeometry(this=0x000061b0000b2880) at vtkRenderer.cxx:744:35
frame #23: 0x00000001100b8076 libvtkRenderingCore-9.2.9.2.6.dylib`vtkRenderer::DeviceRenderOpaqueGeometry(this=0x000061b0000b2880, (null)=0x0000000000000000) at vtkRenderer.cxx:444:9
frame #24: 0x0000000150a9380b libvtkRenderingOpenGL2-9.2.9.2.6.dylib`vtkOpenGLRenderer::DeviceRenderOpaqueGeometry(this=0x000061b0000b2880, fbo=0x0000000000000000) at vtkOpenGLRenderer.cxx:518:25
frame #25: 0x0000000150a8fafb libvtkRenderingOpenGL2-9.2.9.2.6.dylib`vtkOpenGLRenderer::UpdateGeometry(this=0x000061b0000b2880, fbo=0x0000000000000000) at vtkOpenGLRenderer.cxx:394:11
frame #26: 0x0000000150a8bef5 libvtkRenderingOpenGL2-9.2.9.2.6.dylib`vtkOpenGLRenderer::DeviceRender(this=0x000061b0000b2880) at vtkOpenGLRenderer.cxx:299:11
frame #27: 0x00000001100b50f3 libvtkRenderingCore-9.2.9.2.6.dylib`vtkRenderer::Render(this=0x000061b0000b2880) at vtkRenderer.cxx:385:9
frame #28: 0x000000011012ebe9 libvtkRenderingCore-9.2.9.2.6.dylib`vtkRendererCollection::Render(this=0x000060b000006600) at vtkRendererCollection.cxx:52:14
frame #29: 0x000000011001e948 libvtkRenderingCore-9.2.9.2.6.dylib`vtkRenderWindow::DoStereoRender(this=0x0000617000123300) at vtkRenderWindow.cxx:356:22
frame #30: 0x000000011001dca9 libvtkRenderingCore-9.2.9.2.6.dylib`vtkRenderWindow::Render(this=0x0000617000123300) at vtkRenderWindow.cxx:316:9
frame #31: 0x0000000150a7e4b9 libvtkRenderingOpenGL2-9.2.9.2.6.dylib`vtkOpenGLRenderWindow::Render(this=0x0000617000123300) at vtkOpenGLRenderWindow.cxx:2772:21
frame #32: 0x000000014e317034 vtkRenderingOpenGL2.cpython-311-darwin.so`PyvtkOpenGLRenderWindow_Render(self=0x00000001160b5cc0, args=0x0000000101aae1e8) at vtkOpenGLRenderWindowPython.cxx:2481:11
frame #33: 0x00000001016fd754 Python`cfunction_call + 90
frame #34: 0x00000001016adea1 Python`_PyObject_MakeTpCall + 126
frame #35: 0x00000001017a6143 Python`_PyEval_EvalFrameDefault + 57294
frame #36: 0x00000001017973b8 Python`PyEval_EvalCode + 283
frame #37: 0x0000000101791e51 Python`builtin_exec + 482
frame #38: 0x00000001016fe1a6 Python`cfunction_vectorcall_FASTCALL_KEYWORDS + 87
frame #39: 0x00000001017a6018 Python`_PyEval_EvalFrameDefault + 56995
frame #40: 0x00000001017ac1de Python`_PyEval_Vector + 92
frame #41: 0x000000010181e223 Python`pymain_run_module + 212
frame #42: 0x000000010181dda3 Python`Py_RunMain + 1004
frame #43: 0x00000001002a82bf libvtkPythonInterpreter-9.2.1.dylib`vtkPythonInterpreter::PyMain(argc=11, argv=0x00007ff7bfeff4d0) at vtkPythonInterpreter.cxx:674:10
frame #44: 0x0000000100005d67 vtkpython`main(argc=11, argv=0x00007ff7bfeff4d0) at vtkPythonAppInit.cxx:119:10
frame #45: 0x000000010001952e dyld`start + 462
Note how 0x0000631000050824 is not divisible by 8 (aka sizeof(vtkFastGeomQuad*)). The reinterpret_cast is also a clue of something non-kosher.