MantisBT - CMake
View Issue Details
0013258CMakeCMakepublic2012-05-30 11:292012-12-03 07:46
Clinton Stimpson 
David Cole 
normalmajoralways
closedno change required 
CMake 2.8.8 
CMake 2.8.9CMake 2.8.9 
0013258: valgrind reports memory problems in cmIfCommand.cxx
Using DeployQt4.cmake, I can get some odd behavior.
find_package(Qt4)
include(${QT_USE_FILE})
add_executable(myapp myapp.cpp)
target_link_libraries(myapp ${QT_LIBRARIES})
install(TARGETS myapp DESTINATION .)
include(DeployQt4)
install_qt4_executable(myapp "qtiff;qico")

Run cmake. No build or install necessary to see the problem.
Valgrind reports:

==30955== Invalid read of size 8
==30955== at 0x55DA147: __GI___strncasecmp_l (strcmp.S:215)
==30955== by 0x5590EDA: ____strtod_l_internal (strtod_l.c:566)
==30955== by 0x711377: (anonymous namespace)::GetBooleanValue(std::string&, cmMakefile*) (cmIfCommand.cxx:242)
....

That's triggered by the if(${executable_path}) at DeployQt4.cmake line 101, and it appears that executable_path is populated with an unrelated variable.
No tags attached.
Issue History
2012-05-30 11:29Clinton StimpsonNew Issue
2012-06-05 14:46David ColeAssigned To => David Cole
2012-06-05 14:46David ColeStatusnew => assigned
2012-06-13 16:53David ColeNote Added: 0029689
2012-06-13 16:54David ColeTarget Version => CMake 2.8.9
2012-07-03 19:14Mike McQuaidNote Added: 0029901
2012-07-03 19:23Clinton StimpsonNote Added: 0029902
2012-07-09 07:13David ColeNote Added: 0029986
2012-07-09 07:18Mike McQuaidNote Added: 0029993
2012-07-09 07:19David ColeTarget VersionCMake 2.8.9 =>
2012-07-09 12:20Clinton StimpsonNote Added: 0030005
2012-07-09 12:52David ColeNote Added: 0030008
2012-07-09 12:52David ColeStatusassigned => resolved
2012-07-09 12:52David ColeResolutionopen => no change required
2012-07-09 12:52David ColeProduct Version => CMake 2.8.8
2012-07-09 12:52David ColeFixed in Version => CMake 2.8.9
2012-07-09 12:52David ColeTarget Version => CMake 2.8.9
2012-12-03 07:46David ColeNote Added: 0031809
2012-12-03 07:46David ColeStatusresolved => closed

Notes
(0029689)
David Cole   
2012-06-13 16:53   
I changed the dashboard script that drives the CMake valgrind dashboard submission. I added building the Qt cmake-gui, which should have the side effect of activating the Qt4Deploy test on that dashboard.

We'll see if that causes this valgrind report, too.

If not, I'll add the code reported here as-is to the test suite to try to reproduce this...

Then we can figure out the right fix from there.
(0029901)
Mike McQuaid   
2012-07-03 19:14   
Any update on the dashboard valgrind report? Thanks!
(0029902)
Clinton Stimpson   
2012-07-03 19:23   
I was recently debugging a BundleUtitities test failure on another Linux machine, and saw these valgrind errors again. A google search of "valgrind strtod" hints that its a false positive.

I can't remember the original problem off the top of my head, but maybe you want to look at this bug report and see if the -pie linker flag is the real cause of your problems that led to this bug report.
http://www.cmake.org/Bug/view.php?id=13364 [^]
(0029986)
David Cole   
2012-07-09 07:13   
Unset target version field; too late for a fix to go into 2.8.9; deferred until a future version.
(0029993)
Mike McQuaid   
2012-07-09 07:18   
In that case can my DeployQt4 workaround patch go in? Clinton, thoughts?
(0030005)
Clinton Stimpson   
2012-07-09 12:20   
I think we can close this bug, and mark it invalid. I think the valgrind error is a false positive, and it appears unrelated to Mike's original problem.

Here's a better report of the original.
http://cmake.org/Bug/view.php?id=13387 [^]
(0030008)
David Cole   
2012-07-09 12:52   
Resolving as "no change required" per the discussion in the recent notes.
(0031809)
David Cole   
2012-12-03 07:46   
Closing resolved issues that have not been updated in more than 4 months.