

Software bugs on Mars - AndreyKarpov

You know, I feel like writing an article entitled something like &quot;C++ Bugs Visiting Space &#x2F; Mars.&quot; Further in this post, I will explain what I mean and why I am writing it here in the hope to get some help or useful tips from the community.
======
DrScump
Well, this is not specific to C++, but there _was_ the failure of the Mars
Climate Orbiter due to failure to convert between pound-seconds and newton-
seconds:
[https://en.wikipedia.org/wiki/Mars_Climate_Orbiter](https://en.wikipedia.org/wiki/Mars_Climate_Orbiter)

------
AndreyKarpov
I work at a company developing a static code analyzer to detect bugs in C/C++
software. As a means of popularizing the static analysis technology, we check
various open-source projects for bugs and write articles about any issues we
manage to find. Developers enjoy reading them very much as it’s always
interesting to find out what mistakes have been made in this or that project
by its authors.

Of course, we never mean to mock at project authors. We just show that no one
is safe from making a typo and it won’t hurt if one takes some precautions
against it. By means of real-life examples, we show how useful the static
analysis methodology is. The list of our articles can be found here:
[http://www.viva64.com/en/a/0084/](http://www.viva64.com/en/a/0084/)

People often suggest various projects for analysis. In particular, some of our
readers have suggested trying to analyze the source codes of the James Webb
Space Telescope or, even better, Mars rover autonomous driving system.

Indeed, let’s take a look at the list of cool C++ projects composed by Bjarne
Stroustrup:
[http://www.stroustrup.com/applications.html](http://www.stroustrup.com/applications.html)

It turns out that C++ has already travelled to Mars (search through the list
for the NASA keyword). And there is also a lecture CppCon 2014: Mark Maimone
"C++ on Mars: Incorporating C++ into Mars Rover Flight Software" available on
this topic: [https://youtu.be/3SdSKZFoUa8](https://youtu.be/3SdSKZFoUa8)

So we have grown highly enthusiastic about the idea of analyzing such
interesting and safe software system as Mars rover flight software and
probably finding at least a couple of bugs there. Well, the telescope is as
interesting, too.

The hardest thing is how and where to get these source files, or at least
their analogues. I guess no one will give us the source codes for the working
spacecraft. But what if we could get the source codes of the older software
versions or for spacecraft no longer in use?

This is why I am addressing the community. If anyone happens to know, please
tell us whom we can contact to discuss this question. It won’t make any sense
simply writing an email to NASA, will it? And there may be someone in this
community who is directly involved in this area or knows someone who is. I
will appreciate any information, contacts, and help you can offer. I’m sure it
could bring us some interesting materials if it worked out. You can leave your
comments right here or contact us at the following link:
[http://www.viva64.com/en/about-feedback/](http://www.viva64.com/en/about-
feedback/)

P.S. I know about github.com/nasa. But there is nothing interesting in C/C++.

~~~
ectoplasm
Well, Bjarne Stroustrup might have some smart pointers. No seriously, get in
touch. Also, if you can find out who wrote the compiler NASA is using
(probably Intel or IBM), then you can chase it through the development team. I
know the primary XLC team is in Toronto, I believe ICC is in Santa Clara.

