Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Dev

Re: [mythtv-commits] Ticket #3074: AvFormatDecoder and avformat double free crashes

 

 

MythTV dev RSS feed   Index | Next | Previous | View Threaded


jwestfall at surrealistic

Jul 14, 2007, 8:03 AM

Post #1 of 1 (305 views)
Permalink
Re: [mythtv-commits] Ticket #3074: AvFormatDecoder and avformat double free crashes

MythTV <mythtv[at]cvs.mythtv.org> wrote [07.14.07]:
> #3074: AvFormatDecoder and avformat double free crashes
> -----------------------+----------------------------------------------------
> Reporter: jwestfall | Owner: janne
> Type: defect | Status: new
> Priority: minor | Milestone: 0.21
> Component: mythtv | Version: head
> Severity: medium | Resolution:
> Mlocked: 0 |
> -----------------------+----------------------------------------------------
>
> Comment(by danielk):
>
> Janne, av_free has had a NULL pointer check for a very long time for those
> few libc's that aren't NULL pointer safe, and to support the memalign
> hack, which requires the NULL pointer check. (i.e. this wasn't any
> different then the bug report was made, the backtrace may be bad if
> compile time optimizations were enabled --release-type=profile, or if
> something is overwriting memory.)
>

I use --compile-type=debug, I would guess some memory corruption caused
ptr to become NULL during the crash.

My local patch to fix this is to replace the av_free
in AvFormatDecoder::CloseContext() with av_freep. This forces
ic->pb.buffer to NULL after its been free'd. Any additional attempts to
av_free it will hit the NULL check.

jim
_______________________________________________
mythtv-dev mailing list
mythtv-dev[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev

MythTV dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.