Bug 375772

Summary: +1 error in get_elf_symbol_info() when computing value of 'hi' address for ML_(find_rx_mapping)()
Product: [Developer tools] valgrind Reporter: Ivo Raisr <ivosh>
Component: generalAssignee: Ivo Raisr <ivosh>
Status: RESOLVED FIXED    
Severity: crash CC: ivosh
Priority: NOR    
Version: 3.13 SVN   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Solaris   
Latest Commit: Version Fixed In:
Attachments: proposed patch

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.