Feeds

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

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

The Essential Guide to IT Transformation

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

Build a business case: developing custom apps

More from The Register

next story
14 antivirus apps found to have security problems
Vendors just don't care, says researcher, after finding basic boo-boos in security software
'Things' on the Internet-of-things have 25 vulnerabilities apiece
Leaking sprinklers, overheated thermostats and picked locks all online
Only '3% of web servers in top corps' fully fixed after Heartbleed snafu
Just slapping a patched OpenSSL on a machine ain't going to cut it, we're told
How long is too long to wait for a security fix?
Synology finally patches OpenSSL bugs in Trevor's NAS
Secure microkernel that uses maths to be 'bug free' goes open source
Hacker-repelling, drone-protecting code will soon be yours to tweak as you see fit
Israel's Iron Dome missile tech stolen by Chinese hackers
Corporate raiders Comment Crew fingered for attacks
Roll out the welcome mat to hackers and crackers
Security chap pens guide to bug bounty programs that won't fail like Yahoo!'s
HIDDEN packet sniffer spy tech in MILLIONS of iPhones, iPads – expert
Don't panic though – Apple's backdoor is not wide open to all, guru tells us
Researcher sat on critical IE bugs for THREE YEARS
VUPEN waited for Pwn2Own cash while IE's sandbox leaked
prev story

Whitepapers

Implementing global e-invoicing with guaranteed legal certainty
Explaining the role local tax compliance plays in successful supply chain management and e-business and how leading global brands are addressing this.
The Essential Guide to IT Transformation
ServiceNow discusses three IT transformations that can help CIO's automate IT services to transform IT and the enterprise.
Consolidation: The Foundation for IT Business Transformation
In this whitepaper learn how effective consolidation of IT and business resources can enable multiple, meaningful business benefits.
How modern custom applications can spur business growth
Learn how to create, deploy and manage custom applications without consuming or expanding the need for scarce, expensive IT resources.
Build a business case: developing custom apps
Learn how to maximize the value of custom applications by accelerating and simplifying their development.