<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic False negative - uninitalised variable in Analyzers</title>
    <link>https://community.intel.com/t5/Analyzers/False-negative-uninitalised-variable/m-p/826959#M2447</link>
    <description>&lt;DIV id="tiny_quote"&gt;&lt;DIV style="margin-left: 2px; margin-right: 2px;"&gt;Quoting &lt;A jquery1336936743531="58" rel="/en-us/services/profile/quick_profile.php?is_paid=&amp;amp;user_id=490213" href="https://community.intel.com/en-us/profile/490213/" class="basic"&gt;perroe&lt;/A&gt;&lt;/DIV&gt;&lt;DIV style="background-color: #e5e5e5; margin-left: 2px; margin-right: 2px; border: 1px inset; padding: 5px;"&gt;&lt;EM&gt;...&lt;BR /&gt;When compiling and running the attached file Intel Inspector 2011 XE reports "No Problems detected" even though the &lt;B&gt;has_string_&lt;/B&gt; class member variable is used uninitalized...&lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt; [&lt;STRONG&gt;SergeyK&lt;/STRONG&gt;] I just checked the value of the member in the &lt;STRONG&gt;Visual StudioDebugger&lt;/STRONG&gt; and it was initialized to '&lt;STRONG&gt;true&lt;/STRONG&gt;'.&lt;BR /&gt; Sorry, but I have noidea why it is reported as uninitialized.&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;This is a simplified version of a real problem which gave a crash. The problem was found using Valgrind, which correctly reported that a we conditioned on an uninitialised variable.&lt;BR /&gt;&lt;BR /&gt;I'm using Intel Inspector 2011 XE Update 9 (build 218166).&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Per Re&lt;/EM&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;I used a modified Test-Case and I didn't have any problems in Debug and Release configurations. Please take a look:&lt;/P&gt;[cpp]class CTest
{
public:
	CTest( const std::string &amp;amp;string ) : string_( string )
	{
	};

	void DoSomething( void )
	{
		if( has_string_ )
			printf( "%sn", string_.c_str() );
	};

private:
	bool has_string_;
	std::string string_;
};
[/cpp]&lt;P&gt;&lt;BR /&gt;As you can see I'm using '&lt;STRONG&gt;string_.c_str()&lt;/STRONG&gt;' instead of '&lt;STRONG&gt;string_&lt;/STRONG&gt;' when output needs to be done.&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Sergey&lt;/P&gt;</description>
    <pubDate>Sun, 13 May 2012 19:22:58 GMT</pubDate>
    <dc:creator>SergeyKostrov</dc:creator>
    <dc:date>2012-05-13T19:22:58Z</dc:date>
    <item>
      <title>False negative - uninitalised variable.</title>
      <link>https://community.intel.com/t5/Analyzers/False-negative-uninitalised-variable/m-p/826955#M2443</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;When compiling and running the attached file Intel Inspector 2011 XE reports "No Problems detected" even though the &lt;B&gt;has_string_&lt;/B&gt; class member variable is used uninitalized. This is a simplified version of a real problem which gave a crash. The problem was found using Valgrind, which correctly reported that a we conditioned on an uninitialised variable.&lt;BR /&gt;&lt;BR /&gt;I'm using Intel Inspector 2011 XE Update 9 (build 218166).&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Per Re</description>
      <pubDate>Thu, 10 May 2012 11:29:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/False-negative-uninitalised-variable/m-p/826955#M2443</guid>
      <dc:creator>perroe</dc:creator>
      <dc:date>2012-05-10T11:29:14Z</dc:date>
    </item>
    <item>
      <title>False negative - uninitalised variable.</title>
      <link>https://community.intel.com/t5/Analyzers/False-negative-uninitalised-variable/m-p/826956#M2444</link>
      <description>The object 'Test' is allocated on the stack, and by default stack accesses are not analyzed. In the GUI, at the 'Locate Memory Problems' screen, check the box 'Analyze stack accesses'. (From the command line, 'inspxe-cl -collect mi3 -knob analyze-stack-true uma.exe). The uninitialized access of has_string_ is detected when stack analysis is turned on.&lt;BR /&gt;&lt;BR /&gt;Mark</description>
      <pubDate>Thu, 10 May 2012 16:44:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/False-negative-uninitalised-variable/m-p/826956#M2444</guid>
      <dc:creator>Mark_D_Intel</dc:creator>
      <dc:date>2012-05-10T16:44:24Z</dc:date>
    </item>
    <item>
      <title>False negative - uninitalised variable.</title>
      <link>https://community.intel.com/t5/Analyzers/False-negative-uninitalised-variable/m-p/826957#M2445</link>
      <description>Yes, I've run with "analyze stack accesses" checked, but Inspector still does not detect any problems.&lt;BR /&gt;&lt;BR /&gt;Per</description>
      <pubDate>Fri, 11 May 2012 07:40:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/False-negative-uninitalised-variable/m-p/826957#M2445</guid>
      <dc:creator>perroe</dc:creator>
      <dc:date>2012-05-11T07:40:30Z</dc:date>
    </item>
    <item>
      <title>False negative - uninitalised variable.</title>
      <link>https://community.intel.com/t5/Analyzers/False-negative-uninitalised-variable/m-p/826958#M2446</link>
      <description>What OS and compiler versions are you using? I tried the attached example on RH6.1 with gcc 4.4.5 and IXE was able to detect the uninitialized access.&lt;BR /&gt;&lt;BR /&gt;Mark</description>
      <pubDate>Fri, 11 May 2012 21:02:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/False-negative-uninitalised-variable/m-p/826958#M2446</guid>
      <dc:creator>Mark_D_Intel</dc:creator>
      <dc:date>2012-05-11T21:02:19Z</dc:date>
    </item>
    <item>
      <title>False negative - uninitalised variable</title>
      <link>https://community.intel.com/t5/Analyzers/False-negative-uninitalised-variable/m-p/826959#M2447</link>
      <description>&lt;DIV id="tiny_quote"&gt;&lt;DIV style="margin-left: 2px; margin-right: 2px;"&gt;Quoting &lt;A jquery1336936743531="58" rel="/en-us/services/profile/quick_profile.php?is_paid=&amp;amp;user_id=490213" href="https://community.intel.com/en-us/profile/490213/" class="basic"&gt;perroe&lt;/A&gt;&lt;/DIV&gt;&lt;DIV style="background-color: #e5e5e5; margin-left: 2px; margin-right: 2px; border: 1px inset; padding: 5px;"&gt;&lt;EM&gt;...&lt;BR /&gt;When compiling and running the attached file Intel Inspector 2011 XE reports "No Problems detected" even though the &lt;B&gt;has_string_&lt;/B&gt; class member variable is used uninitalized...&lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt; [&lt;STRONG&gt;SergeyK&lt;/STRONG&gt;] I just checked the value of the member in the &lt;STRONG&gt;Visual StudioDebugger&lt;/STRONG&gt; and it was initialized to '&lt;STRONG&gt;true&lt;/STRONG&gt;'.&lt;BR /&gt; Sorry, but I have noidea why it is reported as uninitialized.&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;This is a simplified version of a real problem which gave a crash. The problem was found using Valgrind, which correctly reported that a we conditioned on an uninitialised variable.&lt;BR /&gt;&lt;BR /&gt;I'm using Intel Inspector 2011 XE Update 9 (build 218166).&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Per Re&lt;/EM&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;I used a modified Test-Case and I didn't have any problems in Debug and Release configurations. Please take a look:&lt;/P&gt;[cpp]class CTest
{
public:
	CTest( const std::string &amp;amp;string ) : string_( string )
	{
	};

	void DoSomething( void )
	{
		if( has_string_ )
			printf( "%sn", string_.c_str() );
	};

private:
	bool has_string_;
	std::string string_;
};
[/cpp]&lt;P&gt;&lt;BR /&gt;As you can see I'm using '&lt;STRONG&gt;string_.c_str()&lt;/STRONG&gt;' instead of '&lt;STRONG&gt;string_&lt;/STRONG&gt;' when output needs to be done.&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Sergey&lt;/P&gt;</description>
      <pubDate>Sun, 13 May 2012 19:22:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/False-negative-uninitalised-variable/m-p/826959#M2447</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2012-05-13T19:22:58Z</dc:date>
    </item>
    <item>
      <title>False negative - uninitalised variable.</title>
      <link>https://community.intel.com/t5/Analyzers/False-negative-uninitalised-variable/m-p/826960#M2448</link>
      <description>&lt;DIV id="tiny_quote"&gt;
                &lt;DIV style="margin-left: 2px; margin-right: 2px;"&gt;Quoting &lt;A rel="/en-us/services/profile/quick_profile.php?is_paid=&amp;amp;user_id=404110" class="basic" href="https://community.intel.com/en-us/profile/404110/"&gt;Mark Dewing (Intel)&lt;/A&gt;&lt;/DIV&gt;
                &lt;DIV style="background-color: #e5e5e5; padding: 5px; border: 1px; border-style: inset; margin-left: 2px; margin-right: 2px;"&gt;&lt;I&gt;What OS and compiler versions are you using? I tried the attached example on RH6.1 with gcc 4.4.5 and IXE was able to detect the uninitialized access.&lt;BR /&gt;&lt;BR /&gt;Mark&lt;/I&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using Inspector with Visual Studio 2010 on Windows 7. The Valgrind run was done on RH5 with gcc. &lt;/P&gt;&lt;P&gt;Per&lt;/P&gt;</description>
      <pubDate>Tue, 15 May 2012 08:09:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/False-negative-uninitalised-variable/m-p/826960#M2448</guid>
      <dc:creator>perroe</dc:creator>
      <dc:date>2012-05-15T08:09:56Z</dc:date>
    </item>
  </channel>
</rss>

