Skip to content

[iOS arm64e] call to openh264_decode_image segfaults due to possible pointer authentication failure #3819

Open
@festive-onion

Description

I'm attempting to use this library with libheif on an iOS device with an arm64e build, however I get the following segfault:

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0020000103bdfa20 -> 0x0000000103bdfa20 (possible pointer authentication failure)
Exception Codes: 0x0000000000000001, 0x0020000103bdfa20
Thread 5 Crashed:
0   <redacted>               	       0x102f3839c openh264_decode_image(void*, heif_image**) + 1548
1   <redacted>               	       0x102e877ec Decoder::decode_single_frame_from_compressed_data(heif_decoding_options const&) + 992
2   <redacted>               	       0x102ec3334 ImageItem::decode_compressed_image(heif_decoding_options const&, bool, unsigned int, unsigned int) const + 404
3   <redacted>               	       0x102ec1eac ImageItem::decode_image(heif_decoding_options const&, bool, unsigned int, unsigned int) const + 716
4   <redacted>               	       0x102ed10d4 ImageItem_Grid::decode_and_paste_tile_image(unsigned int, unsigned int, unsigned int, std::__1::shared_ptr<HeifPixelImage>&, heif_decoding_options const&, int&) const + 460
5   <redacted>               	       0x102eda89c decltype(*std::declval<ImageItem_Grid const*>().*std::declval<Error (ImageItem_Grid::*)(unsigned int, unsigned int, unsigned int, std::__1::shared_ptr<HeifPixelImage>&, heif_decoding_options const&, int&) const>()(std::declval<unsigned int>(), std::declval<unsigned int>(), std::declval<unsigned int>(), std::declval<std::__1::reference_wrapper<std::__1::shared_ptr<HeifPixelImage>>>(), std::declval<heif_decoding_options>(), std::declval<std::__1::reference_wrapper<int>>())) std::__1::__invoke[abi:ne180100]<Error (ImageItem_Grid::*)(unsigned int, unsigned int, unsigned int, std::__1::shared_ptr<HeifPixelImage>&, heif_decoding_options const&, int&) const, ImageItem_Grid const*, unsigned int, unsigned int, unsigned int, std::__1::reference_wrapper<std::__1::shared_ptr<HeifPixelImage>>, heif_decoding_options, std::__1::reference_wrapper<int>, void>(Error (ImageItem_Grid::*&&)(unsigned int, unsigned int, unsigned int, std::__1::shared_ptr<HeifPixelImage>&, heif_decoding_options const&, int&) const, ImageItem_Grid const*&&, unsigned int&&, unsigned int&&, unsigned int&&, std::__1::reference_wrapper<std::__1::shared_ptr<HeifPixelImage>>&&, heif_decoding_options&&, std::__1::reference_wrapper<int>&&) + 332
...

I'm uncertain if this is a problem with openh264 specifically, or the way libheif interacts with the library. Let me know if I can provide any more info, thank you!

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions