Our own Carl Ek, architect at Code Integrity Solutions had his article on detecting Endian issues published in the esteemed Dr. Dobbs Journal. Here is the first paragraph and link:
"There are 0010 0000 kinds of people in the world: Those that understand the difference between Big Endian and Little Endian, and those that do not."
Since all binary processors (hardware or software) have an endian design, correct processing of the data based on that endian design is extremely important. The statement above is a version of another joke, but with a twist: the binary is represented in little endian, giving some mild humor for those that understand. For those that don't understand endianness, the humor is lost, much like a processor which has an endian processing defect. In this article, I describe the kinds of defects which occur, and methods where static analysis tools can help detect programming errors and enforce correct programming.
Detecting Endian Issues With Static Analysis
Subscribe to:
Post Comments (Atom)
Thanks for posting Carl Ek's Detecting Endian Issues With Static Analysis -- some time ago I had been looking for guidance on whether a static analysis tool could indeed find endian issues. Didn't succeed with lint, but could try with a high-end tool with customizable rules. While the article doesn't give a full solution, it does point the way.
ReplyDeleteAt Code Integrity Solutions, we've designed some checkers to detect problems such as these using the API's provided by static tools. I believe Klocwork is releasing a few Endian checkers too so you probably want to check these out.
ReplyDelete