Menu

#708 Undefined behavior while converting negative infinity to integer.

v1.0_(example)
closed-fixed
None
5
2023-04-29
2023-04-17
babybus
No

Command Input

gm convert poc_file /dev/null

poc_file are attached.

Sanitizer Dump

coders/mat.c:192:20: runtime error: -nan is outside the range of representable values of type 'int'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior coders/mat.c:192:20 in 
coders/mat.c:197:29: runtime error: -nan is outside the range of representable values of type 'int'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior coders/mat.c:197:29 in

Environment

  • OS: Ubuntu 20.04.1
    -Clang:12.0.0
  • GraphicsMagick: GraphicsMagick-1.3.40

we built GraphicsMagick with UndefinedBehaviourSanitizer (UBSAN).

ptions used to compile and link:
  CC       = clang
  CFLAGS   = -fopenmp -fsanitize=undefined -g -O0 -Wall
  CPPFLAGS = -I/usr/include/freetype2 -I/usr/include/libxml2
  CXX      = clang++
  CXXFLAGS = -fsanitize=undefined -g -O0
  DEFS     = -DHAVE_CONFIG_H
  LDFLAGS  = 
  LIBS     = -ljbig -lwebp -lwebpmux -ltiff -lfreetype -ljpeg -lpng16 -lXext -lSM -lICE -lX11 -llzma -lbz2 -lxml2 -lz -lm -lpthread
1 Attachments

Discussion

  • Bob Friesenhahn

    Bob Friesenhahn - 2023-04-17
    • assigned_to: Bob Friesenhahn
     
  • Bob Friesenhahn

    Bob Friesenhahn - 2023-04-29
    • status: open --> closed-fixed
    • private: Yes --> No
     
  • Bob Friesenhahn

    Bob Friesenhahn - 2023-04-29

    This issue is addressed by Mercurial changeset 17039:d4264d9a4d85

     

Log in to post a comment.

MongoDB Logo MongoDB