# Unexpected bug cascade - or how seemingly missing bugs in MSVC builds reveal actual bugs

DevFeed: [Unexpected bug cascade - or how seemingly missing bugs in MSVC builds reveal actual bugs](<https://devfeed.tech/articles/unexpected-bug-cascade-or-how-seemingly-missing-bugs-in-msvc-builds-reveal-actual-bugs-33037.md>)

Original publisher: [Read original article](<https://reactos.org/blogs/unexpected-bug-cascade-or-how-seemingly-missing-bugs-msvc-builds-reveal-actual-bugs/>)

Published: 2015-12-27T00:00:00Z

Content type: article

Language: en

Sources: [Front Page on ReactOS Website](<https://devfeed.tech/sources/front-page-on-reactos-website.md>)

Topics: [bug](<https://devfeed.tech/topics/bug.md>), [MSVC](<https://devfeed.tech/topics/msvc.md>), [gcc](<https://devfeed.tech/topics/gcc.md>), [Code](<https://devfeed.tech/topics/code.md>), [function](<https://devfeed.tech/topics/function.md>), [ide](<https://devfeed.tech/topics/ide.md>), [export](<https://devfeed.tech/topics/export.md>)

Tags: [breakpoint](<https://devfeed.tech/tags/breakpoint.md>), [bug](<https://devfeed.tech/tags/bug.md>), [code](<https://devfeed.tech/tags/code.md>), [crash](<https://devfeed.tech/tags/crash.md>), [export](<https://devfeed.tech/tags/export.md>), [free](<https://devfeed.tech/tags/free.md>), [function](<https://devfeed.tech/tags/function.md>), [gcc](<https://devfeed.tech/tags/gcc.md>), [msvc](<https://devfeed.tech/tags/msvc.md>), [null](<https://devfeed.tech/tags/null.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [os](<https://devfeed.tech/tags/os.md>), [point](<https://devfeed.tech/tags/point.md>), [react](<https://devfeed.tech/tags/react.md>), [reactos](<https://devfeed.tech/tags/reactos.md>), [win32](<https://devfeed.tech/tags/win32.md>), [winapi](<https://devfeed.tech/tags/winapi.md>)

## AI overview

This article examines how different MSVC and GCC builds exposed a cascade of bugs while investigating a crash in wget.exe. It covers KDBG breakpoint and single-stepping behavior, an MSVC export-resolution issue involving msvcrt.dll and libntdll, and a crash caused by passing a NULL buffer after _vsnprintf returned -1.

## Source excerpt

I was looking into CORE-9105, a crash in wget.exe, but I couldn't reproducde it, so I asked Daniel whether he was using an MSVC build or a GCC build. He used a GCC build and I was using an MSVC build. So I tried with a GCC build and the bug appeared. So I looked at this thing with kdbg. And there the first bug showed up. Bug #1: KDBG and break points I set a breakpoint at a position that I wanted to step through and KDBG stopped there.