you launch your application (compiled in debug mode) with the syntax:
valgrind yourapp
Valgrind will show you the stack backtrace of where segmentation fault occured. After that it's up to you to find what happened and to correct it.
In your code, regardless of valgrind, I would check what returns cont[ "some_key" ]
the most likely cause of your segfault is that the returned value is some wild pointer or not initialized at all. If so any try to access it like cont["some_key"][0]
would also cause a segmentation fault.
Another idea: what about the string keys in your map ? Is it possible that some of them silently (no exception) failed to allocate the data part of the string used as key. The std::map is not an hash table but just some ordered container. When searching a key it may need to access other keys and shit could happen there. To check that you can try to iterate on all keys in your map and show content (to see if problem specifically occurs with "some_key" or if you can access nothing in map.
You could also try with an unordered_map if your program does not need ordering to see if the behavior is the same.