Cisco Systems
3.5 of 5 4,206 reviews
www.cisco.com San Jose, CA 5000+ Employees

Cisco Systems Senior Software Engineer Interview Question

I interviewed in San Jose, CA and was asked:
"How would you debug Memory Corruption ?"
Add Tags [?]
Answer Flag Question

Part of a Senior Software Engineer Interview Review - one of 986 Cisco Systems Interview Reviews

Answers & Comments

2
of 2
votes
Lots of answers to this one. There are some memory bounds-checker type tools, and it's not that complicated to write a basic one from scratch on a decent CPU.
Usually the tools override malloc/free/mmap/... and change them all to mmap protected memory with guard pages before and after the user region. Trying to access beyond the bounds of the region, trying to access a freed region will immediately result in a seg-fault.
Other than that, you can always put some guard data at the beginning and end of every structure and check them occasionally in your code. In many cases you'll be able to see the corrupt data before the program crashes and in some cases you might even be able to identify what data it is (hence where it came from), e.g. strings overriding other data.
- Boaz Sedan on Jun 9, 2010 Flag Response

To comment on this question, Sign In with Facebook or Sign Up


Cisco Systems – Why Work for Us?

We’re the people who made the Internet what it is today. From its early days of simple connectivity to the future of the Internet of Everything, we’ve pioneered it every step of the way. Now we’re building the best team… Full Overview

Provided by employer [?]

Tags are like keywords that help categorize interview questions that have something in common.

Glassdoor is your free inside look at Cisco Systems interview questions and advice. All interview reviews posted anonymously by Cisco Systems employees and interview candidates.