Zack's Kernel News

Zack's Kernel News

Article from Issue 264/2022
Author(s):

Zack discusses mysterious alignments in the kernel; and discovery and invention.

Mysterious Alignments in the Kernel

Sudip Mukherjee reported a build failure with the mainline kernel source tree. This is fairly unusual. Most patches get tested to see if they'll compile on a variety of different systems before the patch is accepted, but a build failure can happen.

After noticing the failure, Sudip did a git bisect – a fast way to jump half the distance to the problem, then half the remaining distance, and so on. It's one of the most common techniques for identifying which patch actually caused a bug. Sudip used it to track the problem down to a small patch that compared the number of bytes used by two different variables that needed to be the same.

Linus Torvalds is often interested in build failures or crashes in the mainline tree because he maintains that tree himself. Linus responded right away to Sudip. He said he had looked at the data size comparison, and it seemed like a good patch to him. He said, "That BUILD_BUG_ON() looks entirely correct, and if that sizeof() doesn't work, then the code doesn't work." In other words, the check was appropriate. Linus added, "I'm not seeing what could go wrong in there."

[...]

Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Kernel News

    Chronicler Zack Brown reports on the latest news, views, dilemmas, and developments within the Linux kernel community.

  • Kernel News

    Chronicler Zack Brown reports on: Supporting Older Tools; and Kernel Bug or Compiler Bug?

  • Kernel News

    Chronicler Zack Brown reports on the latest news, views, dilemmas, and developments within the Linux kernel community.

  • Kernel News

    Chronicler Zack Brown reports on the latest news, views, dilemmas, and developments within the Linux kernel community.

  • Tutorials – Build the Linux Kernel

    Get a super-customized Linux installation by configuring and compiling the kernel with just the features you need.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News