Skip to content

Commit

Permalink
Merge pull request #19370 from JuliaLang/yyc/codegen/unw
Browse files Browse the repository at this point in the history
Fix JIT unwind info registration
  • Loading branch information
staticfloat authored Nov 21, 2016
2 parents d2a19d8 + 05561d2 commit 6803f9a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/debuginfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1894,8 +1894,8 @@ void register_eh_frames(uint8_t *Addr, size_t Size)
// I'm not a great fan of the naming of this constant, but it means the
// right thing, which is a table of FDEs and ips.
di->format = UNW_INFO_FORMAT_IP_OFFSET;
di->u.ti.name_ptr = 0;
di->u.ti.segbase = (unw_word_t)Addr;
di->u.rti.name_ptr = 0;
di->u.rti.segbase = (unw_word_t)Addr;
// Now first count the number of FDEs
size_t nentries = 0;
processFDEs((char*)Addr, Size, [&](const char*){ nentries++; });
Expand Down Expand Up @@ -2001,8 +2001,8 @@ void register_eh_frames(uint8_t *Addr, size_t Size)
}
assert(end_ip != 0);

di->u.ti.table_len = nentries;
di->u.ti.table_data = (unw_word_t*)table;
di->u.rti.table_len = nentries * sizeof(*table) / sizeof(unw_word_t);
di->u.rti.table_data = (unw_word_t)table;
di->start_ip = start_ip;
di->end_ip = end_ip;

Expand Down

0 comments on commit 6803f9a

Please sign in to comment.