View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0016053VTK(No Category)public2016-03-31 18:112016-08-12 09:55
ReporterJukka Isohätälä 
Assigned ToTim Thirion 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionmoved 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0016053: Segfault in vtkLineIntegralConvolution2D, missing NULL checks
Description
At least VTK 7.0+. Minimal example to reproduce:

//test.cc
#include "vtkLineIntegralConvolution2D.h"
#include "vtkSmartPointer.h"

int
main()
{
  vtkSmartPointer<vtkLineIntegralConvolution2D> lic;
  lic = vtkSmartPointer<vtkLineIntegralConvolution2D>::New();
  return 0;
}

Compile and run:
# g++ test.cc -I/usr/include/vtk/ -L/usr/lib/ -lvtkRenderingLICOpenGL2 -lvtkCommonCore
# ./a.out

Result is a segfault.

Trace:
Thread 1 (Thread 0x7ffff7f6b7c0 (LWP 10475)):
#0 0x00007ffff7b88064 in vtkLineIntegralConvolution2D::SetVTShader(vtkShaderProgram*) () from /usr/lib/libvtkRenderingLICOpenGL2.so.1
No symbol table info available.
#1 0x00007ffff7b889e0 in vtkLineIntegralConvolution2D::~vtkLineIntegralConvolution2D() () from /usr/lib/libvtkRenderingLICOpenGL2.so.1
No symbol table info available.
#2 0x00007ffff7b88b79 in vtkLineIntegralConvolution2D::~vtkLineIntegralConvolution2D() () from /usr/lib/libvtkRenderingLICOpenGL2.so.1
No symbol table info available.
#3 0x0000000000400b78 in vtkSmartPointer<vtkLineIntegralConvolution2D>::~vtkSmartPointer() ()
No symbol table info available.
#4 0x0000000000400ad7 in main ()
No symbol table info available.


Looking at the source code, it is pretty clear that the SetVTShader gets called with NULL argument in the vtkLineIntegralConvolution2D destructor. SetVTShader in turn tries to access this->VTShader which may be initialized to NULL => segfault. Missing NULL checks, then? Other setters neglect NULL checks as well.
TagsNo tags attached.
ProjectTBD
Typecrash
Attached Files

 Relationships

  Notes
(0037467)
Kitware Robot (administrator)
2016-08-12 09:55

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2016-03-31 18:11 Jukka Isohätälä New Issue
2016-07-06 10:23 Tim Thirion Assigned To => Tim Thirion
2016-07-06 11:59 Tim Thirion Status backlog => active development
2016-07-06 11:59 Tim Thirion Status active development => gerrit review
2016-08-12 09:55 Kitware Robot Note Added: 0037467
2016-08-12 09:55 Kitware Robot Status gerrit review => closed
2016-08-12 09:55 Kitware Robot Resolution open => moved


Copyright © 2000 - 2018 MantisBT Team