# Debugging a C ABI Bug in UEFI printf Handling

DevFeed: [Debugging a C ABI Bug in UEFI printf Handling](<https://devfeed.tech/articles/pita-bugs-part-3-32989.md>)

Original publisher: [Read original article](<https://reactos.org/blogs/pita-bugs-part-3/>)

Published: 2013-06-26T00:00:00Z

Content type: article

Language: en

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

Topics: [C](<https://devfeed.tech/topics/c.md>), [debug](<https://devfeed.tech/topics/debug.md>), [UEFI](<https://devfeed.tech/topics/uefi.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>)

Tags: [c](<https://devfeed.tech/tags/c.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [debugging](<https://devfeed.tech/tags/debugging.md>), [free](<https://devfeed.tech/tags/free.md>), [intel](<https://devfeed.tech/tags/intel.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [os](<https://devfeed.tech/tags/os.md>), [react](<https://devfeed.tech/tags/react.md>), [reactos](<https://devfeed.tech/tags/reactos.md>), [uefi](<https://devfeed.tech/tags/uefi.md>), [win32](<https://devfeed.tech/tags/win32.md>), [winapi](<https://devfeed.tech/tags/winapi.md>)

## AI overview

This article examines a difficult debugging issue involving C's variadic printf functions and the brittleness of the C ABI. It explains how format specifiers and integer sizes can mismatch, and why UEFI's implementation behaves differently from typical C standard library implementations.

## Source excerpt

It is somewhat difficult to put into words just how much hate I have for this particular issue. Debugging it ended up taking an entire week and the result surprised pretty much everyone on the team, including the senior developers. The issue that was highlighted however has very deep root causes that touch upon the very foundation of the C ABI and its brittleness. First, a slight aside. In C, there is a family of functions that take in a variable number of arguments, the printf functions.