Skip to content

Undefined Behavior Sanitizer error in hb-font.cc:579:72 - index 6 out of bounds for type <unknown> *[1] #935

@pedronavf

Description

@pedronavf

Building harfbuzz 1.7.6 in 32 bits mode with -fsanitize=undefined and running hb-shape <any_font> --text="hello"

hb-font.cc:579:72: runtime error: index 6 out of bounds for type <unknown> *[1]

#0 0xf7df7e30 in hb_font_t::has_func(unsigned int) /home/pnavarro/test/source/harfbuzz/src/hb-font.cc:579
#1 0xf7e888d7 in hb_font_t::has_glyph_h_origin_func() /home/pnavarro/test/source/harfbuzz/src/hb-font-private.hh:175
#2 0xf7e862e7 in hb_ot_position_default /home/pnavarro/test/source/harfbuzz/src/hb-ot-shape.cc:673
#3 0xf7e87045 in hb_ot_position /home/pnavarro/test/source/harfbuzz/src/hb-ot-shape.cc:769
#4 0xf7e87e1f in hb_ot_shape_internal /home/pnavarro/test/source/harfbuzz/src/hb-ot-shape.cc:850
#5 0xf7e8821a in _hb_ot_shape /home/pnavarro/test/source/harfbuzz/src/hb-ot-shape.cc:876
#6 0xf7e07a8a in hb_shape_plan_execute /home/pnavarro/test/source/harfbuzz/src/hb-shaper-list.hh:43
#7 0xf7e06b67 in hb_shape_full /home/pnavarro/test/source/harfbuzz/src/hb-shape.cc:132
#8 0x804b5c1 in shape_options_t::shape(hb_font_t*, hb_buffer_t*, char const**) (/home/pnavarro/test/bin/hb-shape+0x804b5c1)
#9 0x804ed1a in shape_consumer_t<output_buffer_t>::consume_line(char const*, unsigned int, char const*, char const*) (/home/pnavarro/test/bin/hb-shape+0x804ed1a)
#10 0x804e7a2 in main_font_text_t<shape_consumer_t<output_buffer_t>, 2147483647, 0>::main(int, char**) (/home/pnavarro/test/bin/hb-shape+0x804e7a2)
#11 0x804a82d in main /home/pnavarro/test/source/harfbuzz/util/hb-shape.cc:162
#12 0xf720e985 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18985)
#13 0x804a500  (/home/pnavarro/test/bin/hb-shape+0x804a500)

Metadata

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