simulator: build with -fsanitize=address. This will make it much easier to find memory corruption bugs and non-initialized values access.

See more at

https://code.google.com/p/address-sanitizer/wiki/AddressSanitizer
https://developer.mozilla.org/en-US/docs/Mozilla/Testing/Firefox_and_Address_Sanitizer
http://blog.chromium.org/2011/06/testing-chromium-addresssanitizer-fast.html