New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restore threadFlowLocation.kind #202
Comments
I have some general observations about threadFlowLocation.kind and some specific things. I'll start with the general stuff. My impression is that this is threatening to get very unwieldy. I postulate that it will be impossible to specify a set of kinds in this list that is going to satisfy all parties. I would urge that we find the bare minimum set of kinds and stick with those. Right now the kinds are a mix of three things: the kind of node in the control flow, the form of data access that occurs, and "declaration" which is neither of the previous two. The only one I have a strong reaction to is that last one. It's OK to have a declaration in the flow if it is also associated with something that is implicitly executed, but then the right thing would be for it to be counted as whatever that executable thing is (e.g, an assignment or a constructor). In C, "int x;" has no executable content and so IMHO should not appear in the flow. The proposed "endScope" kind feels a bit like this too. The data access kinds "assignment", "usage", and the proposed "alias", "passthrough", and "sanitizer" are starting to feel like overkill. We now have several ways in which something can be called/entered. There is "functionEnter", but also "applicationEntryPoint" is being proposed, and "catch" is kind of similar in that it is an entry to the body of an exception handler. There are others that one might want, such as a signal handler. In that vein, should the entry point to a thread count as functionEnter? Also, a colleague pointed out that it is often useful to distinguish between the kinds of method being called (constructor, destructor, copy-constructor, method, static method, etc...). To avoid this, it might be worth considering whether we want to simply have a generic "enter" and "exit", and to rely on the fact that one can have additional kinds in the list, e.g.: ["enter", "function"] or ["exit", "handler"]. This would work for scopes too: ["exit", "scope"] would replace the proposed "endScope". "continuation" might be problematic. First, that's an overloaded term in PL so it will invite confusion. Second, if you're going to have it, then you will also want a "jump". Plus, it's just the next place in the flow, and I don't see a super good reason for distinguishing either jumps or this continuation from other nodes in the flow. In the "callReturn" note, I just want to confirm that "terminates" does not mean that the execution terminates but that the particular flow that is encoded has come to an end, possibly because the analyzer has concluded it isn't worth showing it. |
I agree that this could get unwieldy. I've tried to incorporate everyone's favorite I don't feel strongly about I don't really agree with the idea that
Yekaterina explicitly asked for
I suppose we ought to add The idea of factoring "enter"/"exit" out from "application", "function", "handler", etc. is intriguing. Michael, what do you think? Yes, "terminate" would refer to the end of the code flow, not the end of program execution. HOWEVER, please look at the latest change draft. That word no longer appears; I've rewritten the notes in this section. |
I think 'usage' is likely something that doesn't have utility for the specific scenario (icon/other kind-specific visualizations) we have in mind. If 'endScope' is interesting then some notion of resource/memory allocation/acquisition may be interesting. Yes, I agree that simplifying enter/exit may be useful. |
Actually I take it back about needing In any case, I don't think we need both. |
These terms have a particular meaning for a form of taint analysis, and they do not necessarily make sense for all kinds of taint analysis. It's fine to have these in the standard, but we need to make it clear that they are very loosely defined and likely incomplete.
By "PL" I mean Programming Languages. See https://en.wikipedia.org/wiki/Continuation. I can't find a good alternative wording, and I don't feel strongly about this, so maybe it's fine. From a graph-theoretic perspective, there's no difference between control passing to the target of an unconditional jump, and control just passing to the next statement in the normal flow. Similarly, the target that immediately follows a loop control predicate evaluating to false is not all that different from the false target of an if statement. As long as the "continuation" kind is not required to be present that's fine. Perhaps the text should say something like this: "These kinds are primarily intended to help a human reader understand the flow of control through the thread, and should not be interpreted as a formal description of the semantics of the path."
OK. that change looks great. |
E-BALLOT #3 PROPOSALRestore SCHEMA CHANGES
The recommended values are:
|
Approved in e-ballot-3. |
We had previously removed
annotatedCodeLocation.kind
, along with the four "kind
-dependent" propertiestarget
,targetLocation
,values
, andstate
. We propose to partially reverse that decision:threadFlowLocation.kind
, giving it (to start with) the same set of values as the oldannotatedCodeLocation.kind
.throw
,catch
,finally
, others? e.g.rethrow
?)kind
-dependent properties.@michaelcfanning FYI
The text was updated successfully, but these errors were encountered: