[FFmpeg-trac] #6403(undetermined:new): Use of both posix_memalign() and realloc() on same memory block not supported

FFmpeg trac at avcodec.org
Wed May 31 02:57:30 EEST 2017


#6403: Use of both posix_memalign() and realloc() on same memory block not
supported
-------------------------------------+-------------------------------------
             Reporter:  jrummell     |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:
              Version:  git-master   |  undetermined
             Keywords:               |               Resolution:
             Blocking:               |               Blocked By:
Analyzed by developer:  0            |  Reproduced by developer:  0
-------------------------------------+-------------------------------------

Comment (by jrummell):

 Since I'm not sure what Chromium / Chrome does, I asked
 [https://groups.google.com/a/chromium.org/forum/#!msg/chromium-
 dev/QaFjUlGD6mI/AQPatcW4BAAJ others].

 It appears that Chromium / Chrome uses
 [https://cs.chromium.org/chromium/src/third_party/tcmalloc/chromium/src/debugallocation.cc?l=1202
 tcmalloc]. I was pointed to several internal bugs from 2013 that discussed
 this issue, and the resolution back then was that since the documentation
 for realloc() does not indicate that it definitely maintains memory
 alignment, it should not be allowed (and thus the warning in debug
 builds). I checked realloc() documentation, and did not find anything that
 says that alignment is preserved (although it would if the memory could be
 realloc'd in place). So I'm unlikely to make a strong case that tcmalloc
 needs changing.

 Since there is data in FFmpeg that needs to be aligned, having Chromium
 move from using posix_memalign() in general seems like it would result in
 slower performance. Unfortunately there's no av_aligned_alloc() to help
 distinguish between the places where aligned memory is required, and where
 it's optional.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/6403#comment:6>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list