Feeds

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

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

Choosing a cloud hosting partner with confidence

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. ®

Choosing a cloud hosting partner with confidence

More from The Register

next story
Webcam hacker pervs in MASS HOME INVASION
You thought you were all alone? Nope – change your password, says ICO
You really need to do some tech support for Aunty Agnes
Free anti-virus software, expires, stops updating and p0wns the world
Meet OneRNG: a fully-open entropy generator for a paranoid age
Kiwis to seek random investors for crowd-funded randomiser
USB coding anarchy: Consider all sticks licked
Thumb drive design ruled by almighty buck
Attack reveals 81 percent of Tor users but admins call for calm
Cisco Netflow a handy tool for cheapskate attackers
Privacy bods offer GOV SPY VICTIMS a FREE SPYWARE SNIFFER
Looks for gov malware that evades most antivirus
Patch NOW! Microsoft slings emergency bug fix at Windows admins
Vulnerability promotes lusers to domain overlords ... oops
prev story

Whitepapers

Why and how to choose the right cloud vendor
The benefits of cloud-based storage in your processes. Eliminate onsite, disk-based backup and archiving in favor of cloud-based data protection.
Getting started with customer-focused identity management
Learn why identity is a fundamental requirement to digital growth, and how without it there is no way to identify and engage customers in a meaningful way.
Reg Reader Research: SaaS based Email and Office Productivity Tools
Read this Reg reader report which provides advice and guidance for SMBs towards the use of SaaS based email and Office productivity tools.
The hidden costs of self-signed SSL certificates
Exploring the true TCO for self-signed SSL certificates, including a side-by-side comparison of a self-signed architecture versus working with a third-party SSL vendor.
Intelligent flash storage arrays
Tegile Intelligent Storage Arrays with IntelliFlash helps IT boost storage utilization and effciency while delivering unmatched storage savings and performance.