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

 * cc: delroth@… (added)
 * status:  closed => reopened
 * resolution:  wontfix =>


Comment:

 I just hit another instance of this bug today on my system and ended up
 finding this bug sadly closed as wontfix. Mixing memalign and realloc hits
 some of the hardening measures implemented in Scudo
 (https://llvm.org/docs/ScudoHardenedAllocator.html).

 Scudo ERROR: allocation type mismatch when reallocating address
 0x7c23c940d440
 #0  0x00007e13cc19cbe0 in raise ()
    from
 /nix/store/bjmg1g133m9xwxa0iy5inp2snvnfg151-glibc-2.27/lib/libc.so.6
 #1  0x00007e13cc19ddc1 in abort ()
    from
 /nix/store/bjmg1g133m9xwxa0iy5inp2snvnfg151-glibc-2.27/lib/libc.so.6
 #2  0x00007e13cf793d9b in __sanitizer::Abort() ()
    from /nix/store/d3h5ip3azss68fak4fq2gk4d8vikh8k7-malloc-provider-
 scudo/lib/libclang_rt.scudo-x86_64.so
 #3  0x00007e13cf781339 in __sanitizer::Die() ()
    from /nix/store/d3h5ip3azss68fak4fq2gk4d8vikh8k7-malloc-provider-
 scudo/lib/libclang_rt.scudo-x86_64.so
 #4  0x00007e13cf7815c6 in __scudo::dieWithMessage(char const*, ...) ()
    from /nix/store/d3h5ip3azss68fak4fq2gk4d8vikh8k7-malloc-provider-
 scudo/lib/libclang_rt.scudo-x86_64.so
 #5  0x00007e13cf77cc51 in __scudo::scudoRealloc(void*, unsigned long) ()
    from /nix/store/d3h5ip3azss68fak4fq2gk4d8vikh8k7-malloc-provider-
 scudo/lib/libclang_rt.scudo-x86_64.so
 #6  0x00007e13cc97c62f in av_realloc_f ()
    from /nix/store/1kxpdivgdaw0znrfwmknj6pgzhh3dc5y-
 ffmpeg-4.1.3/lib/libavutil.so.56
 #7  0x00007e13cc97c685 in av_reallocp_array ()
    from /nix/store/1kxpdivgdaw0znrfwmknj6pgzhh3dc5y-
 ffmpeg-4.1.3/lib/libavutil.so.56
 #8  0x00007e13cd26d188 in ff_h2645_extract_rbsp ()
    from /nix/store/1kxpdivgdaw0znrfwmknj6pgzhh3dc5y-
 ffmpeg-4.1.3/lib/libavcodec.so.58
 ...

 ff_h2645_extract_rbsp calls av_reallocp_array (realloc internally) on
 nal->skipped_bytes_pos which is allocated via av_malloc_array
 (posix_memalign internally).

 Does this qualify as a platform that exists and where this is a real
 issue?

--
Ticket URL: <https://trac.ffmpeg.org/ticket/6403#comment:10>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
_______________________________________________
FFmpeg-trac mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to