Skip to content

Many root causes have no source location #679

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

Open
mattmccutchen-cci opened this issue Aug 16, 2021 · 1 comment
Open

Many root causes have no source location #679

mattmccutchen-cci opened this issue Aug 16, 2021 · 1 comment

Comments

@mattmccutchen-cci
Copy link
Member

I noticed that at the current stage of Zane's port of Icecast, many of the root-cause warnings in PerWildPtrStats.json (as nicely formatted by our internal root_cause tool) have no source location: 118 out of 1369 in total, including some of the highest-score root causes. Are there already known reasons why this can happen? Do we want to try to investigate and fix some of these cases (and file individual issues as appropriate)?

This issue overlaps with #612, but it may be a higher priority to add source locations for root causes for which 3C currently reports no source location at all than to add constraint source locations to root causes that are already covered by the AtomSourceMap fallback. See also #666 (comment) and #674 related to testing of root causes with no source location.

@mattmccutchen-cci mattmccutchen-cci changed the title Many root causes in Icecast port have no source location Many root causes have no source location Oct 19, 2021
@mattmccutchen-cci
Copy link
Member Author

One case that came up: the external PVConstraint of a function parameter doesn't make it into the AtomSourceMap because ProgramInfo::Variables can only hold one ConstraintVariable for a given PSL, and for whatever reason, we chose the internal PVConstraint rather than the external one:

Variables[PSL] = PVInternal;

There's a similar problem with function declarations in macros (#603). It should be straightforward to fix the root-cause locations in these "PSL collision" cases by constructing a map from ConstraintVariable to PSL in the first place so we can represent any number of ConstraintVariables with the same PSL. But then we still have the problem that RewriteConsumer::emitRootCauseDiagnostics deduplicates root-cause warnings seen in different translation units by PSL; it should probably deduplicate them by atom ID or something like that. This work might become obsolete if we end up doing #612, but it might make sense to go ahead and do it anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant