Quantcast
Channel: Intel® Software - Intel® C++ Compiler
Viewing all articles
Browse latest Browse all 1175

Invalid generation of PDB file

$
0
0

Finally I've got the smallest possible program to file reproduce a nasty bug.

#include <stdio.h>
#include <functional>

void TestFunc1(const std::function<void()>& func)
{
	printf("TestFunc1\n");
	func();
}

int main()
{	//  set breakpoint to this line in Release mode
	TestFunc1([=]
	{
	});
    return 0;
}

Steps to reproduce:

  1. Compile in Release mode.
  2. Set breakpoint to line #11.
  3. Run the program using VS debugger.
  4. Wait for breakpoint.
  5. Optionally, create minidump at this point using Task Manager. DON'T use Visual Studio Debug\Save dump as... because it will remove breakpoints from memory.
  6. Continue execution of the program.
  7. An access violation will occur.

It's cool, because without this breakpoint everything works as expected. This problem exists even in Debug mode, but I can't make a small program to reproduce this bug.

There is a way to actually see this bug in disassembly of minidump:

Environment: Windows 10, Visual Studio 2017, x86, ICC 17.0.4.210 (I'm sure that at least 15.x and 16.x compilers are affected too on windows). I saw this bug in Visual Studio 2013, 2015 many years ago.


Viewing all articles
Browse latest Browse all 1175

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>