Bug 375772 - +1 error in get_elf_symbol_info() when computing value of 'hi' address for ML_(find_rx_mapping)()
Summary: +1 error in get_elf_symbol_info() when computing value of 'hi' address for ML...
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: 3.13 SVN
Platform: Compiled Sources Solaris
: NOR crash
Target Milestone: ---
Assignee: Ivo Raisr
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-31 03:49 UTC by Ivo Raisr
Modified: 2017-01-31 12:34 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
proposed patch (1.82 KB, patch)
2017-01-31 04:10 UTC, Ivo Raisr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ivo Raisr 2017-01-31 03:49:37 UTC
Function ML_(find_rx_mapping)() expects 'lo' and 'hi' addresses.
However get_elf_symbol_info() passes the following to it:
ML_(find_rx_mapping)(di,
                     (*sym_avmas_out).main,                    // lo
                     (*sym_avmas_out).main + *sym_size_out);   // hi

Causing the debuginfo reader assert horribly when the last symbol ends precisely
on the text segment end.

I was able to reproduce this problem under special circumstances on sparcv9/Solaris platform, however it is generic. All other ML_(find_rx_mapping)() call sites account for 'lo'/'hi' argument semantics.
Comment 1 Ivo Raisr 2017-01-31 04:10:59 UTC
Created attachment 103726 [details]
proposed patch
Comment 2 Ivo Raisr 2017-01-31 12:34:55 UTC
Fixed in SVN r16216.