Skip to content

Commit

Permalink
Disable vectorization
Browse files Browse the repository at this point in the history
Disable vectorization for now.  To correctly use them, we should
use posix_memalign() to allocate them.  Otherwise, can cause
misaligned access.

https://bugs.chromium.org/p/chromium/issues/detail?id=860184
  • Loading branch information
behdad committed Jul 5, 2018
1 parent 18a06f8 commit 1ebaa09
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/hb-private.hh
Original file line number Diff line number Diff line change
Expand Up @@ -1107,6 +1107,18 @@ struct HbOpXor

/* Compiler-assisted vectorization. */

/*
* Disable vectorization for now. To correctly use them, we should
* use posix_memalign() to allocate them. Otherwise, can cause
* misaligned access.
*
* https://bugs.chromium.org/p/chromium/issues/detail?id=860184
*/
#if !defined(HB_VECTOR_SIZE)
# define HB_VECTOR_SIZE 0
#endif


/* The `vector_size' attribute was introduced in gcc 3.1. */
#if !defined(HB_VECTOR_SIZE)
# if defined( __GNUC__ ) && ( __GNUC__ >= 4 )
Expand Down

3 comments on commit 1ebaa09

@ebraminio
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it caused something like bus error there or some compiler flag has detected it? Can you CC me there if is possible? Just for learning more :)

@behdad
Copy link
Member Author

@behdad behdad commented on 1ebaa09 Jul 5, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we got BUS_ADRALN on 32bit Androids. @drott can CC you. There's not much more info there. Crashes in init0's memset().

@drott
Copy link
Collaborator

@drott drott commented on 1ebaa09 Jul 5, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thread 12 (id: 0x35e4) CRASHED [SIGBUS @ 0xb7286d08 ] MAGIC SIGNATURE THREAD
Stack Quality100%Show frame trust levels
0x9970e95c	(libchrome.so -hb-set-private.hh:53 )	hb_set_t::page_for_insert(unsigned int)
0x9970ec37	(libchrome.so -hb-set-private.hh )	hb_set_t::add_range(unsigned int, unsigned int)
0x9970f2f1	(libchrome.so -hb-ot-layout-common-private.hh:821 )	bool OT::CoverageFormat2::add_coverage<hb_set_t>(hb_set_t*) const
0x997104a1	(libchrome.so + 0x007744a1 )	OT::MarkBasePosFormat1::collect_glyphs(OT::hb_collect_glyphs_context_t*) const
0x99710203	(libchrome.so -hb-ot-layout-gsubgpos-private.hh:134 )	OT::hb_collect_glyphs_context_t::return_t OT::MarkBasePos::dispatch<OT::hb_collect_glyphs_context_t>(OT::hb_collect_glyphs_context_t*) const
0x9971014b	(libchrome.so -hb-ot-layout-common-private.hh:624 )	OT::hb_collect_glyphs_context_t::return_t OT::Lookup::dispatch<OT::PosLookupSubTable, OT::hb_collect_glyphs_context_t>(OT::hb_collect_glyphs_context_t*) const
0x9970e6e3	(libchrome.so -hb-ot-layout-gpos-table.hh:1490 )	hb_ot_layout_lookup_collect_glyphs

Please sign in to comment.