rust icon indicating copy to clipboard operation
rust copied to clipboard

Check link ordinal to make sure it is targetted for foreign function

Open chenyukang opened this issue 3 years ago β€’ 5 comments

Fix #100009, when link ordinal is not target for foreign functions, emit an error.

cc @dpaoliello

chenyukang avatar Aug 03 '22 03:08 chenyukang

r? @jackh726

(rust-highfive has picked a reviewer for you, use r? to override)

rust-highfive avatar Aug 03 '22 03:08 rust-highfive

The job mingw-check failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
configure: rust.debug-assertions := True
configure: rust.overflow-checks := True
configure: llvm.assertions      := True
configure: dist.missing-tools   := True
configure: build.configure-args := ['--enable-sccache', '--disable-manage-submodu ...
configure: writing `config.toml` in current directory
configure: 
configure: run `python /checkout/x.py --help`
Attempting with retry: make prepare
---

######################################################################## 100.0%
extracting /checkout/obj/build/cache/2022-07-21/rustfmt-nightly-x86_64-unknown-linux-gnu.tar.xz to /checkout/obj/build/x86_64-unknown-linux-gnu/stage0
skip untracked path cpu-usage.csv during rustfmt invocations
Diff in /checkout/compiler/rustc_passes/src/errors.rs at line 555:
 #[error(passes::link_ordinal)]
 pub struct LinkOrdinal {
     #[primary_span]
-    pub attr_span: Span
+    pub attr_span: Span,
 
 #[derive(SessionDiagnostic)]
Diff in /checkout/compiler/rustc_passes/src/check_attr.rs at line 146:
                 | sym::stable
                 | sym::stable
                 | sym::rustc_allowed_through_unstable_modules
                 | sym::rustc_promotable => self.check_stability_promotable(&attr, span, target),
-                sym::link_ordinal => {
-                    self.check_link_ordinal(&attr, span, target)
-                },
+                sym::link_ordinal => self.check_link_ordinal(&attr, span, target),
             };
             };
             is_valid &= attr_is_valid;
Running `"/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/rustfmt" "--config-path" "/checkout" "--edition" "2021" "--unstable-features" "--skip-children" "--check" "/checkout/compiler/rustc_monomorphize/src/partitioning/merging.rs" "/checkout/compiler/rustc_monomorphize/src/partitioning/default.rs" "/checkout/compiler/rustc_monomorphize/src/partitioning/mod.rs" "/checkout/compiler/rustc_monomorphize/src/lib.rs" "/checkout/compiler/rustc_passes/src/errors.rs" "/checkout/compiler/rustc_plugin_impl/src/lib.rs" "/checkout/compiler/rustc_ast/src/token.rs" "/checkout/compiler/rustc_passes/src/check_attr.rs"` failed.
If you're running `tidy`, try again with `--bless`. Or, if you just want to format code, run `./x.py fmt` instead.
thread 'thread '<unnamed>' panicked at '<unnamed>tx.send(entry.into_path()) failed with sending on a closed channel', ' panicked at 'tx.send(entry.into_path()) failed with sending on a closed channelformat.rs:', format.rs166::17166
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Any { .. }', /cargo/registry/src/github.com-1ecc6299db9ec823/ignore-0.4.18/src/walk.rs:1302:31

Build completed unsuccessfully in 0:00:12

rust-log-analyzer avatar Aug 03 '22 03:08 rust-log-analyzer

r? @michaelwoerister

dpaoliello avatar Aug 04 '22 16:08 dpaoliello

Looks great, thanks for the PR, @chenyukang!

@bors r+

michaelwoerister avatar Aug 05 '22 08:08 michaelwoerister

:pushpin: Commit e614bbcd301eb4c3dbb65a4aa3147dc0b6ff197c has been approved by michaelwoerister

It is now in the queue for this repository.

bors avatar Aug 05 '22 08:08 bors

:hourglass: Testing commit e614bbcd301eb4c3dbb65a4aa3147dc0b6ff197c with merge 5651759746e6eefa691f61522d19b46d07cf9244...

bors avatar Aug 07 '22 05:08 bors

:sunny: Test successful - checks-actions Approved by: michaelwoerister Pushing 5651759746e6eefa691f61522d19b46d07cf9244 to master...

bors avatar Aug 07 '22 08:08 bors

Finished benchmarking commit (5651759746e6eefa691f61522d19b46d07cf9244): comparison url.

Instruction count

  • Primary benchmarks: no relevant changes found
  • Secondary benchmarks: πŸŽ‰ relevant improvements found
mean[^1] max count[^2]
Regressions 😿
(primary)
N/A N/A 0
Regressions 😿
(secondary)
N/A N/A 0
Improvements πŸŽ‰
(primary)
N/A N/A 0
Improvements πŸŽ‰
(secondary)
-1.4% -1.6% 6
All πŸ˜ΏπŸŽ‰ (primary) N/A N/A 0

Max RSS (memory usage)

Results
  • Primary benchmarks: πŸŽ‰ relevant improvement found
  • Secondary benchmarks: no relevant changes found
mean[^1] max count[^2]
Regressions 😿
(primary)
N/A N/A 0
Regressions 😿
(secondary)
N/A N/A 0
Improvements πŸŽ‰
(primary)
-3.9% -3.9% 1
Improvements πŸŽ‰
(secondary)
N/A N/A 0
All πŸ˜ΏπŸŽ‰ (primary) -3.9% -3.9% 1

Cycles

Results
  • Primary benchmarks: no relevant changes found
  • Secondary benchmarks: mixed results
mean[^1] max count[^2]
Regressions 😿
(primary)
N/A N/A 0
Regressions 😿
(secondary)
2.3% 2.3% 1
Improvements πŸŽ‰
(primary)
N/A N/A 0
Improvements πŸŽ‰
(secondary)
-2.6% -2.6% 1
All πŸ˜ΏπŸŽ‰ (primary) N/A N/A 0

[^1]: the arithmetic mean of the percent change [^2]: number of relevant changes

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@rustbot label: -perf-regression

rust-timer avatar Aug 07 '22 09:08 rust-timer