Skip to content

Commit

Permalink
Fix primary composite table generation.
Browse files Browse the repository at this point in the history
The data structure was designed for branch-free indexing, meaning that
the upper level should have always pointed to a lower level of NULLs,
not directly to NULL so that we'd SEGV on trying to access that part
of the table.
  • Loading branch information
jnthn committed Mar 9, 2016
1 parent 824748d commit 45e24e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/ucd2c.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1191,7 +1191,7 @@ sub emit_composition_lookup {
my $u_table_idx = 0;
my $entries = '';
my $l_tables = 'static const MVMint32 *comp_l_empty[] = {' . ('NULL,' x 256) . "};\n";
my $u_tables = 'static const MVMint32 **comp_u_empty[] = {' . ('NULL,' x 256) . "};\n";
my $u_tables = 'static const MVMint32 **comp_u_empty[] = {' . ('comp_l_empty,' x 256) . "};\n";
my $p_table = 'static const MVMint32 ***comp_p[] = {';
for (my $p = 0; $p < 17; $p++) {
unless ($lookup[$p]) {
Expand Down

0 comments on commit 45e24e0

Please sign in to comment.