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

Move debug_map assertions after check for err #65237

Merged
merged 1 commit into from
Oct 17, 2019
Merged

Move debug_map assertions after check for err #65237

merged 1 commit into from
Oct 17, 2019

Conversation

KodrAus
Copy link
Contributor

@KodrAus KodrAus commented Oct 9, 2019

Fixes #65231

We have some assertions in DebugMap to catch broken implementations of Debug that produce malformed entries. These checks don't make sense if formatting fails partway through. This PR moves those assertions to within the and_then closures along with the other formatting logic, so they're only checked if the map hasn't failed to format an entry already.

@rust-highfive
Copy link
Collaborator

r? @withoutboats

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 9, 2019
@rust-highfive

This comment has been minimized.

@KodrAus
Copy link
Contributor Author

KodrAus commented Oct 17, 2019

r? @sfackler

@sfackler
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Oct 17, 2019

📌 Commit 959a6c1 has been approved by sfackler

@bors bors 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 Oct 17, 2019
@bors
Copy link
Contributor

bors commented Oct 17, 2019

⌛ Testing commit 959a6c1 with merge 599ab854b00e59b07dfaa7f918dbd0292c69a2db...

@rust-highfive
Copy link
Collaborator

The job i686-gnu of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2019-10-17T06:07:56.5482055Z  20  200M   20 41.0M    0     0  5338k      0  0:00:38  0:00:07  0:00:31 4411k
2019-10-17T06:07:56.5482678Z  21  200M   21 42.2M    0     0  5282k      0  0:00:38  0:00:08  0:00:30 4020k
2019-10-17T06:07:56.5558434Z curl: (56) GnuTLS recv error (-24): Decryption has failed.
2019-10-17T06:07:57.5592726Z Command failed. Attempt 2/5:
2019-10-17T06:07:57.5646705Z ** Resuming transfer from byte position 44301691
2019-10-17T06:07:57.5647135Z                                  Dload  Upload   Total   Spent    Left  Speed
2019-10-17T06:07:57.5647201Z 
2019-10-17T06:07:58.2111279Z   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
2019-10-17T06:07:59.2283210Z   0  158M    0  595k    0     0   920k      0  0:02:56 --:--:--  0:02:56  919k
---
2019-10-17T06:08:03.2784085Z  70  158M   70  111M    0     0  19.7M      0  0:00:08  0:00:05  0:00:03 22.1M
2019-10-17T06:08:03.2785052Z  70  158M   70  111M    0     0  19.5M      0  0:00:08  0:00:05  0:00:03 18.0M
2019-10-17T06:08:03.2856702Z curl: (56) GnuTLS recv error (-24): Decryption has failed.
2019-10-17T06:08:05.2896525Z Command failed. Attempt 3/5:
2019-10-17T06:08:05.2950857Z ** Resuming transfer from byte position 161660238
2019-10-17T06:08:05.2951399Z                                  Dload  Upload   Total   Spent    Left  Speed
2019-10-17T06:08:05.2951526Z 
2019-10-17T06:08:06.2414379Z   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
2019-10-17T06:08:07.2095150Z  12 46.7M   12 6070k    0     0  6413k      0  0:00:07 --:--:--  0:00:07 6409k
---
2019-10-17T06:44:10.0554331Z [ 60%] Building CXX object lib/Target/AArch64/MCTargetDesc/CMakeFiles/LLVMAArch64Desc.dir/AArch64ELFObjectWriter.cpp.o
2019-10-17T06:44:10.4423720Z [ 60%] Building CXX object lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64FastISel.cpp.o
2019-10-17T06:44:10.4491025Z [ 60%] Building CXX object lib/Target/AArch64/MCTargetDesc/CMakeFiles/LLVMAArch64Desc.dir/AArch64ELFStreamer.cpp.o
2019-10-17T06:44:10.8365709Z [ 60%] Building CXX object lib/Target/AArch64/MCTargetDesc/CMakeFiles/LLVMAArch64Desc.dir/AArch64InstPrinter.cpp.o
2019-10-17T06:44:10.9074250Z sccache: encountered fatal error
2019-10-17T06:44:10.9076136Z sccache: error : Invalid checksum
2019-10-17T06:44:10.9079265Z sccache:  cause: Invalid checksum
2019-10-17T06:44:10.9087998Z lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/build.make:398: recipe for target 'lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64FastISel.cpp.o' failed
2019-10-17T06:44:10.9090061Z make[2]: *** [lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64FastISel.cpp.o] Error 254
2019-10-17T06:44:10.9098966Z CMakeFiles/Makefile2:7284: recipe for target 'lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/all' failed
2019-10-17T06:44:10.9099137Z make[1]: *** [lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/all] Error 2
2019-10-17T06:44:10.9099247Z make[1]: *** Waiting for unfinished jobs....
2019-10-17T06:44:11.2331688Z [ 60%] Building CXX object lib/Target/AArch64/MCTargetDesc/CMakeFiles/LLVMAArch64Desc.dir/AArch64MCCodeEmitter.cpp.o
2019-10-17T06:44:11.3132623Z [ 60%] Building CXX object lib/Target/AArch64/MCTargetDesc/CMakeFiles/LLVMAArch64Desc.dir/AArch64MCExpr.cpp.o
2019-10-17T06:44:11.6335782Z [ 60%] Building CXX object lib/Target/AArch64/MCTargetDesc/CMakeFiles/LLVMAArch64Desc.dir/AArch64MCTargetDesc.cpp.o
2019-10-17T06:44:11.6573785Z [ 60%] Building CXX object lib/Target/AArch64/MCTargetDesc/CMakeFiles/LLVMAArch64Desc.dir/AArch64MachObjectWriter.cpp.o
2019-10-17T06:44:11.6573785Z [ 60%] Building CXX object lib/Target/AArch64/MCTargetDesc/CMakeFiles/LLVMAArch64Desc.dir/AArch64MachObjectWriter.cpp.o
2019-10-17T06:44:11.9767305Z [ 60%] Building CXX object lib/Target/AArch64/MCTargetDesc/CMakeFiles/LLVMAArch64Desc.dir/AArch64TargetStreamer.cpp.o
2019-10-17T06:44:12.0958115Z [ 60%] Building CXX object lib/Target/AArch64/MCTargetDesc/CMakeFiles/LLVMAArch64Desc.dir/AArch64WinCOFFObjectWriter.cpp.o
2019-10-17T06:44:12.2811976Z [ 60%] Building CXX object lib/Target/AArch64/MCTargetDesc/CMakeFiles/LLVMAArch64Desc.dir/AArch64WinCOFFStreamer.cpp.o
2019-10-17T06:44:12.5086188Z [ 60%] Linking CXX static library ../../../libLLVMAArch64Desc.a
2019-10-17T06:44:12.5472305Z [ 60%] Built target LLVMAArch64Desc
2019-10-17T06:44:12.5482448Z Makefile:149: recipe for target 'all' failed
2019-10-17T06:44:12.5482591Z make: *** [all] Error 2
2019-10-17T06:44:12.5500238Z command did not execute successfully, got: exit code: 2
2019-10-17T06:44:12.5500300Z 
2019-10-17T06:44:12.5500300Z 
2019-10-17T06:44:12.5500697Z build script failed, must exit now', /cargo/registry/src/gh.neting.cc-1ecc6299db9ec823/cmake-0.1.38/src/lib.rs:813:5
2019-10-17T06:44:12.5701165Z  finished in 269.714
2019-10-17T06:44:12.5717027Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --exclude src/bootstrap --exclude src/test/rustdoc-js --exclude src/tools/error_index_generator --exclude src/tools/linkchecker
2019-10-17T06:44:12.5717199Z Build completed unsuccessfully in 0:32:05
2019-10-17T06:44:12.5766701Z == clock drift check ==
2019-10-17T06:44:12.5766701Z == clock drift check ==
2019-10-17T06:44:12.5782071Z   local time: Thu Oct 17 06:44:12 UTC 2019
2019-10-17T06:44:12.7392816Z   network time: Thu, 17 Oct 2019 06:44:12 GMT
2019-10-17T06:44:12.7396312Z == end clock drift check ==
2019-10-17T06:44:13.9879860Z ##[error]Bash exited with code '1'.
2019-10-17T06:44:13.9931010Z ##[section]Starting: Upload CPU usage statistics
2019-10-17T06:44:13.9934885Z ==============================================================================
2019-10-17T06:44:13.9934989Z Task         : Bash
2019-10-17T06:44:13.9935069Z Description  : Run a Bash script on macOS, Linux, or Windows

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@bors
Copy link
Contributor

bors commented Oct 17, 2019

💔 Test failed - checks-azure

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

KodrAus commented Oct 17, 2019

@bors retry

@bors bors 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 Oct 17, 2019
Centril added a commit to Centril/rust that referenced this pull request Oct 17, 2019
Move debug_map assertions after check for err

Fixes rust-lang#65231

We have some assertions in `DebugMap` to catch broken implementations of `Debug` that produce malformed entries. These checks don't make sense if formatting fails partway through. This PR moves those assertions to within the `and_then` closures along with the other formatting logic, so they're only checked if the map hasn't failed to format an entry already.
bors added a commit that referenced this pull request Oct 17, 2019
Rollup of 8 pull requests

Successful merges:

 - #65237 (Move debug_map assertions after check for err)
 - #65316 (make File::try_clone produce non-inheritable handles on Windows)
 - #65319 (InterpCx: make memory field public)
 - #65461 (Don't recommend ONCE_INIT in std::sync::Once)
 - #65465 (Move syntax::ext to a syntax_expand and refactor some attribute logic)
 - #65475 (add example for type_name)
 - #65478 (fmt::Write is about string slices, not byte slices)
 - #65486 (doc: fix typo in OsStrExt and OsStringExt)

Failed merges:

r? @ghost
@bors bors merged commit 959a6c1 into rust-lang:master Oct 17, 2019
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.

DebugMap::finish panics if a value returns fmt::Error
5 participants