]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Merged revisions 222880 via svnmerge from
authorRussell Bryant <russell@russellbryant.com>
Thu, 8 Oct 2009 19:57:28 +0000 (19:57 +0000)
committerRussell Bryant <russell@russellbryant.com>
Thu, 8 Oct 2009 19:57:28 +0000 (19:57 +0000)
commit82a615905ce14058f1d307679c2ee6f74e66c58f
tree7e3787e7ebdd16252d948394a88a440073e7dd9c
parent8225729b80a9c04b0338297251bcab869d9533e3
Merged revisions 222880 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r222880 | russell | 2009-10-08 14:52:03 -0500 (Thu, 08 Oct 2009) | 51 lines

  Merged revisions 222878 via svnmerge from
  https://origsvn.digium.com/svn/asterisk/branches/1.4

  ........
    r222878 | russell | 2009-10-08 14:45:47 -0500 (Thu, 08 Oct 2009) | 44 lines

    Make filestream frame handling safer by isolating frames before returning them.

    This patch is related to a number of issues on the bug tracker that show
    crashes related to freeing frames that came from a filestream.  A number of
    fixes have been made over time while trying to figure out these problems, but
    there re still people seeing the crash.  (Note that some of these bug reports
    include information about other problems.  I am specifically addressing
    the filestream frame crash here.)

    I'm still not clear on what the exact problem is.  However, what is _very_
    clear is that we have seen quite a few problems over time related to unexpected
    behavior when we try to use embedded frames as an optimization.  In some cases,
    this optimization doesn't really provide much due to improvements made in other
    areas.

    In this case, the patch modifies filestream handling such that the embedded frame
    will not be returned.  ast_frisolate() is used to ensure that we end up with a
    completely mallocd frame.  In reality, though, we will not actually have to malloc
    every time.  For filestreams, the frame will almost always be allocated and freed
    in the same thread.  That means that the thread local frame cache will be used.
    So, going this route doesn't hurt.

    With this patch in place, some people have reported success in not seeing the
    crash anymore.

    (SWP-150)
    (AST-208)
    (ABE-1834)

    (issue #15609)
    Reported by: aragon
    Patches:
          filestream_frisolate-1.4.diff2.txt uploaded by russell (license 2)
    Tested by: aragon, russell

    (closes issue #15817)
    Reported by: zerohalo
    Tested by: zerohalo

    (closes issue #15845)
    Reported by: marhbere

    Review: https://reviewboard.asterisk.org/r/386/
  ........
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@222882 65c4cc65-6c06-0410-ace0-fbb531ad65f3
include/asterisk/file.h
include/asterisk/frame.h
main/file.c
main/frame.c