Bug 17587 - too sensitive to duplicate globals across tapset files
Summary: too sensitive to duplicate globals across tapset files
Status: RESOLVED FIXED
Alias: None
Product: systemtap
Classification: Unclassified
Component: translator (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-12 01:21 UTC by Frank Ch. Eigler
Modified: 2015-12-17 22:01 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Ch. Eigler 2014-11-12 01:21:01 UTC
It has been reported that the glib-supplied tapset files
{32,64}-gobject.stp are near-duplicates of one another,
specifically they contain identical

   global gtypes

If an end-user script causes both tapset files to be
processed, this results in

semantic error: conflicting global variables: identifier 'gtypes' at /usr/share/systemtap/tapset/64-gobject.stp:1:8
        source: global gtypes
[...]

In this case, this error need not even be one: a single
global variable can be shared between the tapset files.
(If there were a type incompatibility, that would be
detected separately.)

Before we jump in with a big module/namespace system,
let's change that error to a warning, so this case is
handled similarly to the existing "cross-file global variable"
situation.  (Indeed, the original reported script
necessarily triggers both sets of diagnostics.)
Comment 1 Frank Ch. Eigler 2015-12-17 22:01:41 UTC
private global support moots the sort of diagnostic suggested here