Feeds

Boffins zapped '2,000 bugs' from Curiosity's 2 MILLION lines of code

Billion-dollar laser-firing nuke tank - what could go wrong?

High performance access to file storage

With a $2.5bn price tag, a 350-million mile journey and 2 million lines of C and some C++ code, the only bugs NASA wants its Curiosity rover to find are those possibly beneath the Martian surface.

And it may not be a particularly glamorous job, but software analysis outfit Coverity was the company tasked with "ensuring that every software defect is found and fixed before launch".

Roughly 2,000 bugs were zapped in the rover's code, estimates Andy Chou, the chief technical officer of Coverity, although NASA is schtum on the exact figures.

"For typical software (which this clearly isn't), it's not unusual to find approximately 1 defect for every thousand lines of code," Chou said. "For a project with 2 million lines of code, it would therefore not be unusual for Coverity to be able to find about 2,000 defects."

The company's static analysis tool was used to examine the source code written by NASA's Jet Propulsion Laboratory scientists - specifically the systems that guided Curiosity's flight to the Red Planet and are now running all of the laser-armed robot's onboard functions. At this stage, every bug correction is vital – after all, there's no service desk on Mars.

The source code was fed through Coverity's package, which examined the code to identify flawed logic and common programming gaffes. The error reports were then sent back to NASA's JPL developers so they could sort them out.

Coverity's tool checked the software that controls all the functions of the Rover. Credit: NASA

According to the software vendor's communications manager Chris Adlard, NASA threw all kinds of tests at the code. "You can't really test the Mars landing, so NASA wanted to use every possible way of pruning out mistakes, that's why they were using a lot of methods," he said.

The automated analysis tool was developed from research cooked up by Stanford University boffins. The tech analyses C/C++, Java and C# code bases as it is being compiled for hard-to-spot critical defects including resource leaks, memory corruptions and null pointer dereferences. It also looks at code behaviour to iron out flaws.

Rock-zapping Curiosity is the most complicated project NASA has ever launched to date, and testing was of huge importance. However a software checker can't catch all mistakes: the error that wrecked the space agency's Mars Climate Orbiter wouldn't have been spotted by Coverity's software, Chou admitted. That particular cock-up was caused by boffins mixing up measurements in imperial and metric units.

It's not the first time the static analysis tool has been called up to check the globe's biggest projects: it was also responsible for pulling the bugs out of CERN's particle accelerator, which included 3.5 million lines of code in the ROOT framework - the software that sifted the petabytes of data coming out of the machine - and 50 million lines in associated science projects. The Large Hadron Collider's ROOT code was more buggy than average: 40,000 bugs were found and squashed. ®

High performance access to file storage

More from The Register

next story
Obama allows NSA to exploit 0-days: report
If the spooks say they need it, they get it
Web data BLEEDOUT: Users to feel the pain as Heartbleed bug revealed
Vendors and ISPs have work to do updating firmware - if it's possible to fix this
OpenSSL Heartbleed: Bloody nose for open-source bleeding hearts
Bloke behind the cockup says not enough people are helping crucial crypto project
One year on: diplomatic fail as Chinese APT gangs get back to work
Mandiant says past 12 months shows Beijing won't call off its hackers
Call of Duty 'fragged using OpenSSL's Heartbleed exploit'
So it begins ... or maybe not, says one analyst
Heartbleed exploit, inoculation, both released
File under 'this is going to hurt you more than it hurts me'
Parent gabfest Mumsnet hit by SSL bug: My heart bleeds, grins hacker
Natter-board tells middle-class Britain to purée its passwords
Experian subsidiary faces MEGA-PROBE for 'selling consumer data to fraudster'
US attorneys general roll up sleeves, snap on gloves
prev story

Whitepapers

Mainstay ROI - Does application security pay?
In this whitepaper learn how you and your enterprise might benefit from better software security.
Five 3D headsets to be won!
We were so impressed by the Durovis Dive headset we’ve asked the company to give some away to Reg readers.
3 Big data security analytics techniques
Applying these Big Data security analytics techniques can help you make your business safer by detecting attacks early, before significant damage is done.
The benefits of software based PBX
Why you should break free from your proprietary PBX and how to leverage your existing server hardware.
Mobile application security study
Download this report to see the alarming realities regarding the sheer number of applications vulnerable to attack, as well as the most common and easily addressable vulnerability errors.