Files
asterisk/main
Sean Bright 0701feaa95 Merged revisions 323579 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r323579 | seanbright | 2011-06-15 11:22:50 -0400 (Wed, 15 Jun 2011) | 32 lines
  
  Merged revisions 323559 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r323559 | seanbright | 2011-06-15 11:15:30 -0400 (Wed, 15 Jun 2011) | 25 lines
    
    Resolve a segfault/bus error when we try to map memory that falls on a page
    boundary.
    
    The fix for ASTERISK-15359 was incorrect in that it added 1 to the length of the
    mmap'd region.  The problem with this is that reading/writing to that extra byte
    outside of the bounds of the underlying fd causes a bus error.
    
    The real issue is that we are working with both a FILE * and the raw fd
    underneath it and not synchronizing between them.  The code that was removed in
    ASTERISK-15359 was correct, but we weren't flushing the FILE * before mapping
    the fd.
    
    Looking at the manager code in 1.4 reveals that the FILE * in 'struct
    mansession' is never used except to create a temporary file that we immediately
    fdopen.  This means we just need to write a 0 byte to the fd and everything will
    just work.  The other branches require a call to fflush() which, while not a
    guaranteed fix, should reduce the likelihood of a crash.
    
    This all makes sense in my head.
    
    (closes issue ASTERISK-16460)
    Reported by: Ravelomanantsoa Hoby (hoby)
    Patches:
    		issue17747_1.4_svn_markII.patch uploaded by Sean Bright (license #5060)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@323608 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-15 15:31:53 +00:00
..
2010-12-20 09:14:29 +00:00
2011-06-01 23:11:55 +00:00
2011-06-10 15:29:00 +00:00
2010-07-14 15:48:36 +00:00
2011-05-27 21:54:54 +00:00
2010-06-17 17:23:43 +00:00
2011-04-20 05:25:15 +00:00
2011-06-14 16:33:55 +00:00