Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime error: load of misaligned address #5033

Closed
xiaoxiaoafeifei opened this issue Apr 9, 2022 · 0 comments · Fixed by #5034
Closed

runtime error: load of misaligned address #5033

xiaoxiaoafeifei opened this issue Apr 9, 2022 · 0 comments · Fixed by #5034

Comments

@xiaoxiaoafeifei
Copy link
Contributor

xiaoxiaoafeifei commented Apr 9, 2022

ImageMagick version

7.1.0-29

Operating system

Linux

Operating system, version and so on

Ubuntu 20.04.4 LTS

Description

Hi, there is runtime error: load of misaligned address at MagickCore/property.c:1548,1553

Here's UBSAN log:
MagickCore/property.c:1548:15: runtime error: load of misaligned address 0x62300000710b for type 'float', which requires 4 byte alignment
0x62300000710b: note: pointer points here
49 2a 00 08 00 00 00 02 00 1a 01 0b 00 14 00 00 00 05 00 00 00 05 00 01 00 05 00 00 40 05 00 00
^
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior MagickCore/property.c:1548:15 in

MagickCore/property.c:1553:15: runtime error: load of misaligned address 0x62300000714d for type 'double', which requires 8 byte alignment
0x62300000714d: note: pointer points here
01 04 00 01 00 00 00 06 00 00 00 01 02 04 00 01 00 00 00 00 00 80 08 02 02 04 00 01 00 00 00 3f
^
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior MagickCore/property.c:1553:15 in

Steps to Reproduce

CC=clang CXX=clang++ CFLAGS="-fsanitize=address,undefined -g" CXXFLAGS="-fsanitize=address,undefined -g" ./configure
make & make install
/usr/local/bin/magick convert poc /dev/null

Images

poc.zip

xiaoxiaoafeifei added a commit to xiaoxiaoafeifei/ImageMagick that referenced this issue Apr 9, 2022
urban-warrior pushed a commit that referenced this issue Apr 9, 2022
* fix Division by zero in XMenuWidget() of MagickCore/widget.c

* Fix memory leak in AnimateImageCommand() of MagickWand/animate.c and DisplayImageCommand() of MagickWand/display.c

* fix Division by zero in ReadEnhMetaFile() of coders/emf.c

* Resolve conflicts

* fix issue: outside the range of representable values of type 'unsigned char' at coders/psd.c:1025

* fix error: 4e+26 is outside the range of representable values of type 'unsigned long' at coders/pcl.c:299

* fix #5033:runtime error: load of misaligned address

Co-authored-by: zhailiangliang <zhailiangliang@loongson.cn>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant