-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
GlyphStore out-of-bounds access with multiple combining characters #582
Copy link
Copy link
Closed
Labels
Description
Sourced from http://en.wikipedia.org/wiki/Wikipedia. The text is অসমীয়া ; base64'd below.
Steps to reproduce:
RUST_LOG='gfx::text::glyph=4,gfx::font=2' \
./servo 'data:text/html;base64,PGh0bWw+PGhlYWQ+PG1ldGEgY2hhcnNldD0iVVRGLTgiPjwvaGVhZD48Ym9keT7gpoXgprjgpq7gp4Dgpq/gprzgpr48L2JvZHk+PC9odG1sPgo='
Output (with some of my own debug statements included):
rust: ~"making GlyphStore for ~\"\\u0985\\u09b8\\u09ae\\u09c0\\u09af\\u09bc\\u09be\" = 7 characters"
rust: ~"add_glyph_for_char_index: index 0, my entries are ~[{value: 0}, {value: 0}, {value: 0}, {value: 0}, {value: 0}, {value: 0}, {value: 0}]"
rust: ~"add_glyph_for_char_index: index 1, my entries are ~[{value: 2194669568}, {value: 0}, {value: 0}, {value: 0}, {value: 0}, {value: 0}, {value: 0}]"
rust: ~"add_glyph_for_char_index: index 2, my entries are ~[{value: 2194669568}, {value: 2194669568}, {value: 0}, {value: 0}, {value: 0}, {value: 0}, {value: 0}]"
rust: ~"add_glyph_for_char_index: index 3, my entries are ~[{value: 2194669568}, {value: 2194669568}, {value: 2194669568}, {value: 0}, {value: 0}, {value: 0}, {value: 0}]"
rust: ~"Adding entry[off=4] for detailed glyphs: &[{index: 0, advance: {__field__: 720}, offset: {x: {__field__: 0}, y: {__field__: 0}}}, {index: 0, advance: {__field__: 0}, offset: {x: {__field__: 0}, y: {__field__: 0}}}]"
rust: ~"creating complex glyph entry: starts_cluster=true, starts_ligature=false, glyph_count=2"
rust: ~"Adding multiple glyphs[idx=4, count=2]: {value: 517}"
rust: ~"creating complex glyph entry: starts_cluster=false, starts_ligature=false, glyph_count=0"
rust: ~"adding spacer for chracter without associated glyph[idx=5]"
rust: ~"creating complex glyph entry: starts_cluster=false, starts_ligature=false, glyph_count=0"
rust: ~"adding spacer for chracter without associated glyph[idx=6]"
rust: ~"add_glyph_for_char_index: index 7, my entries are ~[{value: 2194669568}, {value: 2194669568}, {value: 2194669568}, {value: 2194669568}, {value: 517}, {value: 7}, {value: 7}]"
rust: task failed at 'assertion failed: i < self.entry_buffer.len()', /home/keegan/proj/servo/servo/src/components/gfx/text/glyph.rs:549
rust: domain main @0x7f3e780103e0 root task failed
rust: task failed at 'killed', /home/keegan/proj/servo/servo/src/compiler/rust/src/libstd/pipes.rs:282
rust: task failed at 'killed', /home/keegan/proj/servo/servo/src/compiler/rust/src/libstd/pipes.rs:282
rust: task failed at 'killed', /home/keegan/proj/servo/servo/src/compiler/rust/src/libstd/pipes.rs:282
rust: task failed at 'killed', /home/keegan/proj/servo/servo/src/compiler/rust/src/libstd/pipes.rs:282
rust: task failed at 'killed', /home/keegan/proj/servo/servo/src/compiler/rust/src/libstd/pipes.rs:282
rust: task failed at 'killed', /home/keegan/proj/servo/servo/src/compiler/rust/src/libstd/pipes.rs:282
rust: task failed at 'killed', /home/keegan/proj/servo/servo/src/compiler/rust/src/libstd/pipes.rs:282
rust: task failed at 'killed', /home/keegan/proj/servo/servo/src/compiler/rust/src/libstd/pipes.rs:282
rust: task failed at 'killed', /home/keegan/proj/servo/servo/src/compiler/rust/src/libstd/pipes.rs:282
rust: task failed at 'killed', /home/keegan/proj/servo/servo/src/compiler/rust/src/libstd/pipes.rs:282
rust: task failed at 'killed', /home/keegan/proj/servo/servo/src/compiler/rust/src/libstd/pipes.rs:282
Segmentation fault
Reactions are currently unavailable