Skip to content
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

Map invalid Spans to DUMMY_SP during crate metadata encoding. #47177

Conversation

michaelwoerister
Copy link
Member

This mirrors what we do for stabilizing the incr. comp. cache and is necessary for reproducible builds. For the incr. comp. cache, we have to do this because the encoding there cannot represent broken Spans. Metadata encoding has to be in sync with that as not to get unexpected interactions when compiling incrementally.

This should help with fixing issue #47066.

r? @alexcrichton

This mirrors what we for stabilizing the incr. comp. cache and is
necessary for reproducible builds.
@kennytm kennytm added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 4, 2018

let span = span.data();

if span.lo > span.hi {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I mentioned in #47066 (comment), this should not be possible when you use Span.
Span uses encoding lo + len, similarly to metadata, so it can't represent spans with lo > hi.

@michaelwoerister
Copy link
Member Author

Thanks, @petrochenkov, I replaced the if with a debug_assertion().

@alexcrichton
Copy link
Member

@bors: r+

Looks great!

@bors
Copy link
Contributor

bors commented Jan 4, 2018

📌 Commit 30d921f has been approved by alexcrichton

@alexcrichton alexcrichton added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 4, 2018
@bors
Copy link
Contributor

bors commented Jan 7, 2018

⌛ Testing commit 30d921f with merge 69f17d1...

bors added a commit that referenced this pull request Jan 7, 2018
…tadata-encoding, r=alexcrichton

Map invalid Spans to DUMMY_SP during crate metadata encoding.

This mirrors what we do for stabilizing the incr. comp. cache and is necessary for reproducible builds. For the incr. comp. cache, we *have* to do this because the encoding there cannot represent broken Spans. Metadata encoding has to be in sync with that as not to get unexpected interactions when compiling incrementally.

This should help with fixing issue #47066.

r? @alexcrichton
@bors
Copy link
Contributor

bors commented Jan 7, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing 69f17d1 to master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants