{"push_id":591908936,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"22828f1f3502c7fe95f411884be8629abc235a0a","before":"fffa03307418dd23db61a958ea25ef63655d53bc","commits":[{"sha":"22828f1f3502c7fe95f411884be8629abc235a0a","author":{"email":"317a993f1126881a6019d7e476a07af7fa3e05fe@f38db490-d61c-443f-a65b-d21fe96a405b","name":"mjordan"},"message":"translate: Prevent invalid memory accesses on fast shutdown\n\nWhen a 'core restart now' or 'core stop now' is executed and a channel is\ncurrently in a media operation, the translator matrix can be destroyed while a\nchannel is currently blocked on getting the best translation choice\n(see ast_translator_best_choice). When the channel gets the mutex, the\ntranslation matrix now has invalid memory, and Asterisk crashes.\n\nThis patch does two things:\n(1) We now only clean up the translation matrix on a graceful shutdown. In that\n    case, there are no channels, and so there is no risk of this occurring.\n(2) We also now set the __matrix and __indextable to NULL. In some initial\n    backtraces when this occurred, it looked as if there was a memory corruption\n    occurring, and it wasn't until we determined that something had restarted\n    Asterisk that the issue became clear. By setting these to NULL on shutdown,\n    it becomes a bit easier to determine why a crash is occurring.\n\nNote that we could litter the code with NULL checks on the __matrix, but the\nact of making the translation matrix cleaned up on shutdown should preclude\nthis issue from occurring in the first place, and this part of the code needs\nto be as fast as possible.\n\nReview: https://reviewboard.asterisk.org/r/4457/\n........\n\nMerged revisions 432453 from http://svn.asterisk.org/svn/asterisk/branches/13\n\n\ngit-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@432455 f38db490-d61c-443f-a65b-d21fe96a405b","distinct":true,"url":"https://api.github.com/repos/K0HAX/asterisk/commits/22828f1f3502c7fe95f411884be8629abc235a0a"}]}