|
From: poornima b. <poo...@gm...> - 2011-12-14 09:30:03
|
Dear Valgrind-team, I am getting following error when i run valgrind on my code. I want to understand what this error means and how to fix it. In the below code we pass valid file name to SetOutputMetaFile function. The code looks fine to me but no idea why this error is reported by valgrind. Please help me to understand this error. ==16368== Syscall param unlink(pathname) points to unaddressable byte(s) ==16368== at 0x8C6DB2: unlink (in /lib/libc-2.7.so) ==16368== by 0x4171EA0: vml::CVMLib::SetOutputMetaFile(char const*, double, double) (vmPortable.h:362) ==16368== by 0x417E20C: vmlSetOutputMetaFile (VMLibAPI.cpp:647) ==16368== by 0x805511A: CUT_VmlSetOutputMetaFile::TC_Suite03_01_001(TestResult&, char const*) (in /home/sface/SFacePlusRegularTest/VMLibraryTesting/111207_suraj/VMAPIUnitTest/VMAPIUnitTest/VMAPIUnitTest) ==16368== by 0x805985D: test_vmlSetOutputMetaFileTest::RunTest(TestResult&) (in /home/sface/SFacePlusRegularTest/VMLibraryTesting/111207_suraj/VMAPIUnitTest/VMAPIUnitTest/VMAPIUnitTest) ==16368== by 0x80EB8FB: Test::Run(TestResult&) (in /home/sface/SFacePlusRegularTest/VMLibraryTesting/111207_suraj/VMAPIUnitTest/VMAPIUnitTest/VMAPIUnitTest) ==16368== by 0x80EBCBD: TestRegistry::Run(TestResult&) (in /home/sface/SFacePlusRegularTest/VMLibraryTesting/111207_suraj/VMAPIUnitTest/VMAPIUnitTest/VMAPIUnitTest) ==16368== by 0x8049A22: main (in /home/sface/SFacePlusRegularTest/VMLibraryTesting/111207_suraj/VMAPIUnitTest/VMAPIUnitTest/VMAPIUnitTest) ==16368== Address 0x0 is not stack'd, malloc'd or (recently) free'd I am using valgrind3.4.1 version on GNU/Linux system. Thanks & Regards, Porrima Bi radar |
|
From: <pa...@fr...> - 2011-12-14 11:40:12
|
----- Original Message ----- > Dear Valgrind-team, > > I am getting following error when i run valgrind on my code. > I want to understand what this error means and how to fix it. > In the below code we pass valid file name to SetOutputMetaFile > function. The code looks fine to me > but no idea why this error is reported by valgrind. Please help me to > understand this error. > ==16368== Syscall param unlink(pathname) points to unaddressable > byte(s) > ==16368== at 0x8C6DB2: unlink (in /lib/libc-2.7.so) > ==16368== by 0x4171EA0: vml::CVMLib::SetOutputMetaFile(char ... > ==16368== by 0x8049A22: main (in > /home/sface/SFacePlusRegularTest/VMLibraryTesting/111207_suraj/VMAPIUnitTest/VMAPIUnitTest/VMAPIUnitTest) > ==16368== Address 0x0 is not stack'd, malloc'd or (recently) free'd > > I am using valgrind3.4.1 version on GNU/Linux system. Valgrind is saying that the path argument of unlink is null. Are you sure that the version you are testing with Valgrind has a non-null path? Have you tried attaching a debugger to display path? Paul |
|
From: poornima b. <poo...@gm...> - 2011-12-14 12:46:29
|
Thank you Paul, you are right there was null parameter being passed to unlink in my code. I fixed the issue in my code. Thanks alot for your time :) On Wed, Dec 14, 2011 at 5:09 PM, <pa...@fr...> wrote: > ----- Original Message ----- >> Dear Valgrind-team, >> >> I am getting following error when i run valgrind on my code. >> I want to understand what this error means and how to fix it. >> In the below code we pass valid file name to SetOutputMetaFile >> function. The code looks fine to me >> but no idea why this error is reported by valgrind. Please help me to >> understand this error. > >> ==16368== Syscall param unlink(pathname) points to unaddressable >> byte(s) >> ==16368== at 0x8C6DB2: unlink (in /lib/libc-2.7.so) >> ==16368== by 0x4171EA0: vml::CVMLib::SetOutputMetaFile(char > ... >> ==16368== by 0x8049A22: main (in >> /home/sface/SFacePlusRegularTest/VMLibraryTesting/111207_suraj/VMAPIUnitTest/VMAPIUnitTest/VMAPIUnitTest) >> ==16368== Address 0x0 is not stack'd, malloc'd or (recently) free'd >> >> I am using valgrind3.4.1 version on GNU/Linux system. > > Valgrind is saying that the path argument of unlink is null. Are you sure that the version you are testing with Valgrind has a non-null path? > > Have you tried attaching a debugger to display path? > > Paul |