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

Add error for using null characters in #[export_name] #51747

Merged
merged 3 commits into from
Jun 26, 2018

Conversation

varkor
Copy link
Member

@varkor varkor commented Jun 23, 2018

Fixes #51741.

@rust-highfive
Copy link
Collaborator

r? @estebank

(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 Jun 23, 2018
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 of your PR failed on Travis (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.

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)

@varkor varkor force-pushed the export_name-null-character branch from 85e84ec to 82803fd Compare June 23, 2018 23:16
@varkor
Copy link
Member Author

varkor commented Jun 23, 2018

I can't see any explicit errors in the log above, so I'm going to assume it was spurious...

Copy link
Member

@Mark-Simulacrum Mark-Simulacrum left a comment

Choose a reason for hiding this comment

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

r=me other than the nit

error[E0648]: `export_name` may not contain null characters
--> $DIR/E0648.rs:11:1
|
LL | #[export_name="/0foo"] //~ ERROR E0648
Copy link
Member

Choose a reason for hiding this comment

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

This output looks like the slash was inverted - is that an artifact of compiletest?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah — the actual error is correct, but for whatever reason, the stderr requires a forward slash.

Copy link
Member

Choose a reason for hiding this comment

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

It's probably because we're trying to have all paths be unix-style and are perhaps a bit too eager with slash replacement.

@Mark-Simulacrum
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Jun 24, 2018

📌 Commit 82803fd has been approved by Mark-Simulacrum

@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 Jun 24, 2018
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 of your PR failed on Travis (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.

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 Jun 24, 2018

⌛ Testing commit 82803fd with merge 3ab47fc2725979d38ed2fd9dc59a7cf567496d6b...

@bors
Copy link
Contributor

bors commented Jun 24, 2018

💔 Test failed - status-travis

@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 Jun 24, 2018
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-debug of your PR failed on Travis (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.
[00:04:12]  Downloading quote v0.5.1
[00:04:12]  Downloading unicode-xid v0.1.0
[00:04:12]  Downloading fixedbitset v0.1.9
[00:04:12]  Downloading ordermap v0.3.5
[00:04:28] warning: spurious network error (2 tries remaining): failed to get 200 response from `https://crates.io/api/v1/crates/ordermap/0.3.5/download`, got 500
[00:04:47] warning: spurious network error (1 tries remaining): failed to get 200 response from `https://crates.io/api/v1/crates/ordermap/0.3.5/download`, got 500
[00:05:04] error: unable to get packages from source
[00:05:04] Caused by:
[00:05:04] Caused by:
[00:05:04]   failed to get 200 response from `https://crates.io/api/v1/crates/ordermap/0.3.5/download`, got 500
[00:05:04] failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml
travis_time:end:0ea59dae:start=1529818550034692430,finish=1529818855004647086,duration=304969954656

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 1.
travis_time:start:095bcf6b
---
travis_time:end:011976f0:start=1529818855259257381,finish=1529818855265567341,duration=6309960
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:2783be26
$ head -30 ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
head: cannot open ‘./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers’ for reading: No such file or directory
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:034fc5a8
$ dmesg | grep -i kill

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)

1 similar comment
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-debug of your PR failed on Travis (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.
[00:04:12]  Downloading quote v0.5.1
[00:04:12]  Downloading unicode-xid v0.1.0
[00:04:12]  Downloading fixedbitset v0.1.9
[00:04:12]  Downloading ordermap v0.3.5
[00:04:28] warning: spurious network error (2 tries remaining): failed to get 200 response from `https://crates.io/api/v1/crates/ordermap/0.3.5/download`, got 500
[00:04:47] warning: spurious network error (1 tries remaining): failed to get 200 response from `https://crates.io/api/v1/crates/ordermap/0.3.5/download`, got 500
[00:05:04] error: unable to get packages from source
[00:05:04] Caused by:
[00:05:04] Caused by:
[00:05:04]   failed to get 200 response from `https://crates.io/api/v1/crates/ordermap/0.3.5/download`, got 500
[00:05:04] failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml
travis_time:end:0ea59dae:start=1529818550034692430,finish=1529818855004647086,duration=304969954656

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 1.
travis_time:start:095bcf6b
---
travis_time:end:011976f0:start=1529818855259257381,finish=1529818855265567341,duration=6309960
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:2783be26
$ head -30 ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
head: cannot open ‘./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers’ for reading: No such file or directory
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:034fc5a8
$ dmesg | grep -i kill

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)

@pietroalbini
Copy link
Member

@bors retry (crates.io failure)

@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 Jun 24, 2018
@kennytm
Copy link
Member

kennytm commented Jun 24, 2018

@bors r-

CI error still not fixed.

[01:36:58] ---- /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md - Rust_Compiler_Error_Index::E0648 (line 10980) stdout ----
[01:36:58] error: expected statement after outer attribute
[01:36:58]  --> /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md:10982:1
[01:36:58]   |
[01:36:58] 4 | }
[01:36:58]   | ^
[01:36:58] 
[01:36:58] thread '/checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md - Rust_Compiler_Error_Index::E0648 (line 10980)' panicked at 'Some expected error codes were not found: ["E0648"]', librustdoc/test.rs:332:13
[01:36:58] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[01:36:58] 
[01:36:58] 
[01:36:58] failures:
[01:36:58]     /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md - Rust_Compiler_Error_Index::E0648 (line 10980)

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 24, 2018

```compile_fail,E0648
#[export_name="\0foo"] // error: `export_name` may not contain null characters
```
Copy link
Member

Choose a reason for hiding this comment

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

Please put an item after the attribute.

Copy link
Member Author

Choose a reason for hiding this comment

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

Whoops! Done.

@estebank
Copy link
Contributor

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jun 24, 2018

📌 Commit f94c075 has been approved by estebank

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 24, 2018
@bors
Copy link
Contributor

bors commented Jun 24, 2018

⌛ Testing commit f94c075 with merge efbbecb70507c0e4417c270e491e4b0c74b93d55...

@bors
Copy link
Contributor

bors commented Jun 24, 2018

💔 Test failed - status-travis

@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 Jun 24, 2018
@rust-highfive
Copy link
Collaborator

Your PR failed on Travis (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.
[00:00:54] sha256:dc365898ae0130338f4ac4e5ddd8d3b248c287c6baa3ba22c0314117d4c95534
[00:00:54] Attempting with retry: docker build --rm -t rust-ci -f /home/travis/build/rust-lang/rust/src/ci/docker/armhf-gnu/Dockerfile /home/travis/build/rust-lang/rust/src/ci/docker
[00:00:54] Sending build context to Docker daemon  501.2kB
[00:00:54] Step 1/20 : FROM ubuntu:16.04
[00:00:54] Get https://registry-1.docker.io/v2/library/ubuntu/manifests/16.04: received unexpected HTTP status: 503 Service Unavailable
[00:00:55] Sending build context to Docker daemon  501.2kB
[00:00:55] Step 1/20 : FROM ubuntu:16.04
[00:00:55] Step 1/20 : FROM ubuntu:16.04
[00:00:56] Get https://registry-1.docker.io/v2/library/ubuntu/manifests/16.04: received unexpected HTTP status: 503 Service Unavailable
[00:00:58] Sending build context to Docker daemon  501.2kB
[00:00:58] Step 1/20 : FROM ubuntu:16.04
[00:00:58] Step 1/20 : FROM ubuntu:16.04
[00:00:58] Get https://registry-1.docker.io/v2/library/ubuntu/manifests/16.04: received unexpected HTTP status: 503 Service Unavailable
[00:01:01] Sending build context to Docker daemon  501.2kB
[00:01:01] Step 1/20 : FROM ubuntu:16.04
[00:01:01] Step 1/20 : FROM ubuntu:16.04
[00:01:01] Get https://registry-1.docker.io/v2/library/ubuntu/manifests/16.04: received unexpected HTTP status: 503 Service Unavailable
[00:01:05] Sending build context to Docker daemon  501.2kB
[00:01:05] Step 1/20 : FROM ubuntu:16.04
[00:01:05] Step 1/20 : FROM ubuntu:16.04
[00:01:06] Get https://registry-1.docker.io/v2/library/ubuntu/manifests/16.04: received unexpected HTTP status: 503 Service Unavailable
[00:01:06] The command has failed after 5 attempts.

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 1.
travis_time:start:1d2f7f43
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
---
travis_time:end:0fe49c2a:start=1529878611278246440,finish=1529878611283691648,duration=5445208
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:099b79cc
$ head -30 ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
head: cannot open ‘./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers’ for reading: No such file or directory
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:08fbfc76
$ dmesg | grep -i kill

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)

1 similar comment
@rust-highfive
Copy link
Collaborator

Your PR failed on Travis (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.
[00:00:54] sha256:dc365898ae0130338f4ac4e5ddd8d3b248c287c6baa3ba22c0314117d4c95534
[00:00:54] Attempting with retry: docker build --rm -t rust-ci -f /home/travis/build/rust-lang/rust/src/ci/docker/armhf-gnu/Dockerfile /home/travis/build/rust-lang/rust/src/ci/docker
[00:00:54] Sending build context to Docker daemon  501.2kB
[00:00:54] Step 1/20 : FROM ubuntu:16.04
[00:00:54] Get https://registry-1.docker.io/v2/library/ubuntu/manifests/16.04: received unexpected HTTP status: 503 Service Unavailable
[00:00:55] Sending build context to Docker daemon  501.2kB
[00:00:55] Step 1/20 : FROM ubuntu:16.04
[00:00:55] Step 1/20 : FROM ubuntu:16.04
[00:00:56] Get https://registry-1.docker.io/v2/library/ubuntu/manifests/16.04: received unexpected HTTP status: 503 Service Unavailable
[00:00:58] Sending build context to Docker daemon  501.2kB
[00:00:58] Step 1/20 : FROM ubuntu:16.04
[00:00:58] Step 1/20 : FROM ubuntu:16.04
[00:00:58] Get https://registry-1.docker.io/v2/library/ubuntu/manifests/16.04: received unexpected HTTP status: 503 Service Unavailable
[00:01:01] Sending build context to Docker daemon  501.2kB
[00:01:01] Step 1/20 : FROM ubuntu:16.04
[00:01:01] Step 1/20 : FROM ubuntu:16.04
[00:01:01] Get https://registry-1.docker.io/v2/library/ubuntu/manifests/16.04: received unexpected HTTP status: 503 Service Unavailable
[00:01:05] Sending build context to Docker daemon  501.2kB
[00:01:05] Step 1/20 : FROM ubuntu:16.04
[00:01:05] Step 1/20 : FROM ubuntu:16.04
[00:01:06] Get https://registry-1.docker.io/v2/library/ubuntu/manifests/16.04: received unexpected HTTP status: 503 Service Unavailable
[00:01:06] The command has failed after 5 attempts.

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 1.
travis_time:start:1d2f7f43
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
---
travis_time:end:0fe49c2a:start=1529878611278246440,finish=1529878611283691648,duration=5445208
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:099b79cc
$ head -30 ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
head: cannot open ‘./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers’ for reading: No such file or directory
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:08fbfc76
$ dmesg | grep -i kill

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)

@kennytm
Copy link
Member

kennytm commented Jun 25, 2018

@bors retry #40474

@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 Jun 25, 2018
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Jun 25, 2018
…r=estebank

Add error for using null characters in #[export_name]

Fixes rust-lang#51741.
pietroalbini added a commit to pietroalbini/rust that referenced this pull request Jun 26, 2018
…r=estebank

Add error for using null characters in #[export_name]

Fixes rust-lang#51741.
bors added a commit that referenced this pull request Jun 26, 2018
Rollup of 11 pull requests

Successful merges:

 - #51104 (add `dyn ` to display of dynamic (trait) types)
 - #51153 (Link panic and compile_error docs)
 - #51642 (Fix unknown windows build)
 - #51730 (New safe associated functions for PinMut)
 - #51731 (Fix ICEs when using continue as an array length inside closures (inside loop conditions))
 - #51747 (Add error for using null characters in #[export_name])
 - #51769 (Update broken rustc-guide links)
 - #51786 (Remove unnecessary stat64 pointer casts)
 - #51788 (Fix typo)
 - #51789 (Don't ICE when performing `lower_pattern_unadjusted` on a `TyError`)
 - #51791 (Minify css)

Failed merges:

r? @ghost
@bors bors merged commit f94c075 into rust-lang:master Jun 26, 2018
@varkor varkor deleted the export_name-null-character branch June 26, 2018 14:02
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.

7 participants