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: [SCM] systemtap: system-wide probe/trace tool branch, master, updated. release-0.9.7-199-gad00230


Hi Stan,

On Tue, 2009-06-09 at 02:00 +0000, scox@sourceware.org wrote:
> commit ad002306b50c6cc3c3601fac31dfe3ecf23749fb
> Author: Stan Cox <scox@redhat.com>
> Date:   Mon Jun 8 21:57:44 2009 -0400
> 
>     * tapsets.cxx (probe_table): Make mark_name and sess refs.
>     (probe_table::get_next_probe): Dissect using struct probe_table.
>     (sdt_var_expanding_visitor): Use lex_cast.
>     (dwarf_builder::build): Copy probe and location for TOK_MARK cases.
>     Call derive_probes for kprobe and utrace cases.

I have some trouble following the new logic in probe_table, and so does
gcc:

tapsets.cxx: In constructor âdwarf_builder::probe_table::probe_table(std::string&, systemtap_session&, dwflpp*, probe_point*)â:
tapsets.cxx:692: error: âshdrâ may be used uninitialized in this function
tapsets.cxx: In constructor âdwarf_builder::probe_table::probe_table(std::string&, systemtap_session&, dwflpp*, probe_point*)â:
tapsets.cxx:692: error: âshdrâ may be used uninitialized in this function

I think gcc is right. Originally the shdr was initialized to NULL and
then the have_probes boolean was used as guard to know whether or not we
had a valid .probes section and so could access shdr. The new code seems
to use the have_probes guard only for part of accessing shdr, the end of
the function accesses it whether or not it is valid because the
if (!have_probes) return guard was removed. Also it removes the setting
of have_probes = false in case a SHT_NOBITS .probes section was found,
which seems wrong, since in that case that section will not contain
anything, so you shouldn't try to access it directly.

Could you take a look?

Thanks,

Mark


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