View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0006027 | ParaView | (No Category) | public | 2007-11-08 15:24 | 2009-05-13 13:47 | ||||
Reporter | Berk Geveci | ||||||||
Assigned To | Utkarsh Ayachit | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | |||||||||
Target Version | 3.6 | Fixed in Version | |||||||
Summary | 0006027: Possible uninitialized memory access | ||||||||
Description | Reported by Mattijs Janssens <m.janssens@opencfd.co.uk> Just something I noticed. Our reader module (for OpenFOAM) installs a malloc routine (through __malloc_hook) which initialises all memory to NaN. It also sets floating point trapping (FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW). We use this as a simple way of catching uninitialised data. I've noticed that I get a floating point exception when I do a cell (or point) selection i.e. it seems to use uninitialised data. If I switch off the exception handling it works just fine. I attach a traceback of the error. Lines 0..2 are from our exception trapping routine. Last vtk/paraview routine is #3, SetFrustum. Kind regards, Mattijs #0 Foam::error::printStack(Foam::Ostream&) in "/home/hunt2/mattijs/OpenFOAM/OpenFOAM-1.4.2/lib/linux64GccDPOpt/libOpenFOAM.so" #1 Foam::sigFpe::sigFpeHandler(int) in "/home/hunt2/mattijs/OpenFOAM/OpenFOAM-1.4.2/lib/linux64GccDPOpt/libOpenFOAM.so" #2 Uninterpreted: /lib64/libpthread.so.0 [0x2b7542bc4130] in "/lib64/libpthread.so.0" #3 vtkSelectionSource::SetFrustum(double*) in "/home/hunt2/mattijs/OpenFOAM/linuxAMD64/ParaView3.2-mpi/lib/paraview-3.2/libvtkGraphics.so.pv3.2" #4 vtkSelectionSourceCommand(vtkClientServerInterpreter*, vtkObjectBase*, char const*, vtkClientServerStream const&, vtkClientServerStream&) #5 vtkClientServerInterpreter::ProcessCommandInvoke(vtkClientServerStream const&, int) in "/home/hunt2/mattijs/OpenFOAM/linuxAMD64/ParaView3.2-mpi/lib/paraview-3.2/libvtkClientServer.so" #6 vtkClientServerInterpreter::ProcessOneMessage(vtkClientServerStream const&, int) in "/home/hunt2/mattijs/OpenFOAM/linuxAMD64/ParaView3.2-mpi/lib/paraview-3.2/libvtkClientServer.so" #7 vtkClientServerInterpreter::ProcessStream(vtkClientServerStream const&) in "/home/hunt2/mattijs/OpenFOAM/linuxAMD64/ParaView3.2-mpi/lib/paraview-3.2/libvtkClientServer.so" #8 vtkSelfConnection::ProcessStreamLocally(vtkClientServerStream&) 0000009 vtkSelfConnection::SendStreamToClient(vtkClientServerStream&) in "/home/hunt2/mattijs/OpenFOAM/linuxAMD64/ParaView3.2-mpi/lib/paraview-3.2/libvtkPVServerCommon.so" #10 vtkProcessModuleConnection::SendStream(unsigned int, vtkClientServerStream&) in "/home/hunt2/mattijs/OpenFOAM/linuxAMD64/ParaView3.2-mpi/lib/paraview-3.2/libvtkPVServerCommon.so" 0000011 vtkProcessModuleConnectionManager::SendStream(long long, unsigned int, vtkClientServerStream&, int) in "/home/hunt2/mattijs/OpenFOAM/linuxAMD64/ParaView3.2-mpi/lib/paraview-3.2/libvtkPVServerCommon.so" #12 vtkProcessModule::SendStream(long long, unsigned int, vtkClientServerStream&, int) #13 vtkSMProxy::UpdateProperty(char const*, int) #14 vtkSMProxy::UpdateProperty(char const*) #15 vtkSMProxy::UpdateVTKObjects() in "/home/hunt2/mattijs/OpenFOAM/linuxAMD64/ParaView3.2-mpi/lib/paraview-3.2/libvtkPVServerManager.so" #16 vtkSMSelectionHelper::NewSelectionSourceFromSelection(long long, vtkSelection*) in "/home/hunt2/mattijs/OpenFOAM/linuxAMD64/ParaView3.2-mpi/lib/paraview-3.2/libvtkPVServerManager.so" #17 vtkSMSurfaceRepresentationProxy::ConvertSelection(vtkSelection*) #18 vtkSMPVRepresentationProxy::ConvertSelection(vtkSelection*) #19 vtkSMRenderViewProxy::SelectOnSurface(unsigned int, unsigned int, unsigned int, unsigned int, vtkCollection*, vtkCollection*, vtkCollection*, bool, bool) in "/home/hunt2/mattijs/OpenFOAM/linuxAMD64/ParaView3.2-mpi/lib/paraview-3.2/libvtkPVServerManager.so" #20 pqRenderView::selectOnSurface(int*) #21 pqRubberBandHelper::processEvents(unsigned long) in "/home/hunt2/mattijs/OpenFOAM/linuxAMD64/ParaView3.2-mpi/lib/paraview-3.2/libpqCore.so" #22 pqRubberBandHelper::vtkPQSelectionObserver::Execute(vtkObject*, unsigned long, void*) #23 vtkSubjectHelper::InvokeEvent(unsigned long, void*, vtkObject*) in "/home/hunt2/mattijs/OpenFOAM/linuxAMD64/ParaView3.2-mpi/lib/paraview-3.2/libvtkCommon.so.pv3.2" #24 vtkObject::InvokeEvent(unsigned long, void*) in "/home/hunt2/mattijs/OpenFOAM/linuxAMD64/ParaView3.2-mpi/lib/paraview-3.2/libvtkCommon.so.pv3.2" #25 QVTKWidget::mouseReleaseEvent(QMouseEvent*) #26 QWidget::event(QEvent*) #27 QVTKWidget::event(QEvent*) in "/home/hunt2/mattijs/OpenFOAM/linuxAMD64/ParaView3.2-mpi/lib/paraview-3.2/libQVTK.so.pv3.2" #28 QApplicationPrivate::notify_helper(QObject*, QEvent*) #29 QApplication::notify(QObject*, QEvent*) in "/home/hunt2/mattijs/OpenFOAM/linuxAMD64/ParaView3.2-mpi/lib/paraview-3.2/libQtGui.so.4" #30 Uninterpreted: /home/hunt2/mattijs/OpenFOAM/linuxAMD64/ParaView3.2-mpi/lib/paraview-3.2/libQtGui.so.4 [0x2b753ffb4406] #31 QApplication::x11ProcessEvent(_XEvent*) #32 ?? #33 g_main_context_dispatch in "/opt/gnome/lib64/libglib-2.0.so.0" #34 ?? #35 g_main_context_iteration in "/opt/gnome/lib64/libglib-2.0.so.0" #36 QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) in "/home/hunt2/mattijs/OpenFOAM/linuxAMD64/ParaView3.2-mpi/lib/paraview-3.2/libQtCore.so.4" #37 ?? in "/home/hunt2/mattijs/OpenFOAM/linuxAMD64/ParaView3.2-mpi/lib/paraview-3.2/libQtGui.so.4" #38 QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) #39 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) in "/home/hunt2/mattijs/OpenFOAM/linuxAMD64/ParaView3.2-mpi/lib/paraview-3.2/libQtCore.so.4" #40 QCoreApplication::exec() in "/home/hunt2/mattijs/OpenFOAM/linuxAMD64/ParaView3.2-mpi/lib/paraview-3.2/libQtCore.so.4" #41 pqProcessModuleGUIHelper::RunGUIStart(int, char**, int, int) #42 vtkProcessModule::StartClient(int, char**) in "/home/hunt2/mattijs/OpenFOAM/linuxAMD64/ParaView3.2-mpi/lib/paraview-3.2/libvtkPVServerCommon.so" #43 vtkProcessModule::Start(int, char**) in "/home/hunt2/mattijs/OpenFOAM/linuxAMD64/ParaView3.2-mpi/lib/paraview-3.2/libvtkPVServerCommon.so" #44 vtkProcessModuleGUIHelper::Run(vtkPVOptions*) in "/home/hunt2/mattijs/OpenFOAM/linuxAMD64/ParaView3.2-mpi/lib/paraview-3.2/libvtkPVServerCommon.so" #45 pqMain::Run(QApplication&, pqProcessModuleGUIHelper*) #46 main in "/home/hunt2/mattijs/OpenFOAM/linuxAMD64/ParaView3.2-mpi/lib/paraview-3.2/paraview-real" #47 __libc_start_main #48 vtkObject::RegisterInternal(vtkObjectBase*, int) in "/home/hunt2/mattijs/OpenFOAM/linuxAMD64/ParaView3.2-mpi/lib/paraview-3.2/paraview-real" | ||||||||
Tags | No tags attached. | ||||||||
Project | |||||||||
Topic Name | |||||||||
Type | |||||||||
Attached Files | sigFpe.C [^] (5,516 bytes) 2008-04-08 13:59 | ||||||||
Relationships | |
Relationships |
Notes | |
(0011157) Ken Moreland (manager) 2008-04-08 11:58 |
Is it possible to get example data and reader? I'm not sure how we can replicate/test/fix this problem without it. |
(0011164) Mattijs (reporter) 2008-04-08 14:04 |
I uploaded the piece of code we use in our reader. It is all quite OpenFOAM specific so you'll have to code a bit yourself: - sigFpe::set is the main routine: 1. sets floating point trapping (sigaction(..)) 2. sets a special malloc hook (my_malloc_hook) which initialises the allocated block with NaN. Btw. does this bug forum email me if there is a change to my bug report? |
(0016229) Utkarsh Ayachit (administrator) 2009-04-28 16:49 |
There selection code has changed since 3.2. I tested with valgrind and could not find any uninitialized memory access. marking this resolved unless told otherwise. |
(0016234) Alan Scott (manager) 2009-04-28 20:53 |
I agree with Utkarsh. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2007-11-08 15:24 | Berk Geveci | New Issue | |
2008-04-08 11:57 | Ken Moreland | Category | 3.4 => 3.6 |
2008-04-08 11:58 | Ken Moreland | Note Added: 0011157 | |
2008-04-08 13:59 | Mattijs | File Added: sigFpe.C | |
2008-04-08 14:04 | Mattijs | Note Added: 0011164 | |
2009-02-16 17:27 | Ken Moreland | Status | backlog => tabled |
2009-02-16 17:27 | Ken Moreland | Assigned To | => Utkarsh Ayachit |
2009-04-28 16:49 | Utkarsh Ayachit | Note Added: 0016229 | |
2009-04-28 16:49 | Utkarsh Ayachit | Status | tabled => @80@ |
2009-04-28 16:49 | Utkarsh Ayachit | Resolution | open => fixed |
2009-04-28 20:53 | Alan Scott | Note Added: 0016234 | |
2009-04-28 20:53 | Alan Scott | Status | @80@ => closed |
2009-05-13 13:44 | Utkarsh Ayachit | Target Version | => 3.6 |
2011-06-16 13:10 | Zack Galbreath | Category | => (No Category) |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |