This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC updated PATCH 1/2] Bug Translator 3016 : Error accessing members of anonymous structs / unions


Hi Prerna,

Prerna Saxena wrote:
Agree, but making "die_mem" as the 6th arg will disturb the call flow.
This is because in each recursive call, the 6th arg is overwritten by a die which is pointed to by DW_AT_type attribute of the original attr_mem. If die_mem is re-used as 6th arg instead of a new variable, the old contents of die (in the parent recursive call) will also be lost as both die & die_mem point to the same location, (whose contents would be overwritten). This is not a problem if search in a branch has succeeded-- but in case a search path fails and a new branch needs to be tried, this will deem it impossible.


I agree with your concern about "temp_die_2" being local memory on the stack which may be reused, so I've fixed it by copying the contents of "temp_die_2" to "die_mem" in case of a successful match. This should take care of memory errors.

Hmm, you seems right, but the below command still cause SEGV.


$ stap -e 'probe module("libsas").function("sas_ex_revalidate_domain"){print($port_dev->ex_dev->children)}' -vp2
Pass 1: parsed user script and 45 library script(s) in 370usr/30sys/404real ms.
Segmentation fault

Would you run above command for testing & debugging?

Thank you,

--
Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America) Inc.
Software Solutions Division

e-mail: mhiramat@redhat.com



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]