r/cpp • • May 07 '16

Visual Studio adding telemetry function calls to binary?

http://imgur.com/TiVrXyf
596 Upvotes

211 comments sorted by

View all comments

Show parent comments

-3

u/dakotahawkins May 08 '16 edited May 08 '16

If you walk through your code using Visual Studio's provided disassembly view, you will NOT see these function calls. Only when you use a third-party application like Ida do the call become visible.

That's the only thing that really bothers me. The functionality itself seems reasonable. I'd even buy that it might be useful or just very innocuous and that they felt they didn't need to really publicise it very "loudly".

But if they are hiding it on purpose in their disassembly view, that's a big WTF.

Edit:

The disassembly view is uglier than OP's in visual studio, but I DO see some telemetry stuff in there.

12

u/SeanMiddleditch May 08 '16

It's not being hidden. There's just a surprising lack of understanding of how C++ applications actually work (on any platform) in this subreddit dedicated to C++. :/

The OS does not actually call directly into your main function. A combination of the compiler and the runtime create a real entry point that does a bunch of initialization before invoking the user-supplied main. Some of that code lives in the shared runtime library and some gets linked into the application. These Telemetry calls (and how do so few programmers here know "telemetry" a very general term and not just the name of a specific Windows feature) are part of the code that gets linked directly into the application for various reasons.

1

u/dakotahawkins May 08 '16

No disagreement there. It is something that should show up in the debugger's assembly view though, and the accusation that it doesn't or the insinuation that it was being scrubbed out of it somehow was worrying.

Turns out that isn't the case, though. It's all there.