diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2019-10-10 16:37:25 -0700 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2019-10-11 09:02:37 -0700 |
commit | e168da45a26f1067cb939a91c5d673b33911023a (patch) | |
tree | 72f0172e0ae23aa760e3f188c0a0b1c1713b1965 /bfd | |
parent | b0531efe2ea1fd751c37cc09c2d0dc7a88e995fa (diff) | |
download | fsf-binutils-gdb-e168da45a26f1067cb939a91c5d673b33911023a.zip fsf-binutils-gdb-e168da45a26f1067cb939a91c5d673b33911023a.tar.gz fsf-binutils-gdb-e168da45a26f1067cb939a91c5d673b33911023a.tar.bz2 |
bfd/dwarf2.c: fix assertion failure in comp_unit_hash_info
stash_maybe_enable_info_hash_tables sets
stash->info_hash_status = STASH_INFO_HASH_ON;
regardless of the result of stash_maybe_update_info_hash_tables call. In
case it fails this results in repeated invocation of comp_unit_hash_info
for the same comp unit and assertion failure in this function.
Only set stash->info_hash_status = STASH_INFO_HASH_ON; when
stash_maybe_update_info_hash_tables is successful.
bfd/
2019-10-11 Max Filippov <jcmvbkbc@gmail.com>
* dwarf2.c (stash_maybe_enable_info_hash_tables): Only set
stash->info_hash_status = STASH_INFO_HASH_ON when
stash_maybe_update_info_hash_tables succeeds.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/dwarf2.c | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 87a6244..56f38cf 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2019-10-11 Max Filippov <jcmvbkbc@gmail.com> + + * dwarf2.c (stash_maybe_enable_info_hash_tables): Only set + stash->info_hash_status = STASH_INFO_HASH_ON when + stash_maybe_update_info_hash_tables succeeds. + 2019-10-09 Alan Modra <amodra@gmail.com> PR 25070 diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c index 88aaa2d..75d19aa 100644 --- a/bfd/dwarf2.c +++ b/bfd/dwarf2.c @@ -4231,8 +4231,8 @@ stash_maybe_enable_info_hash_tables (bfd *abfd, struct dwarf2_debug *stash) /* We need a forced update so that the info hash tables will be created even though there is no compilation unit. That happens if STASH_INFO_HASH_TRIGGER is 0. */ - stash_maybe_update_info_hash_tables (stash); - stash->info_hash_status = STASH_INFO_HASH_ON; + if (stash_maybe_update_info_hash_tables (stash)) + stash->info_hash_status = STASH_INFO_HASH_ON; } /* Find the file and line associated with a symbol and address using the |