-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Rollup of 12 pull requests #136572
Rollup of 12 pull requests #136572
Conversation
This changes the `cenum_impl_drop_cast` lint to be a hard error. This lint has been deny-by-default and warning in dependencies since rust-lang#97652 about 2.5 years ago. Closes rust-lang#73333
To make it easier to tell the conditional branching.
This does not work with GNU Make 3.80, but this is just to make it easier to follow during review.
`-g` is an alias for `-C debuginfo=2`.
Co-authored-by: Oneirical <[email protected]>
Set environment variables before launching the process and restore the prior variables after the program exists. This is the same implementation as the one used by UEFI Shell Execute [0]. [0]: https://github.com/tianocore/edk2/blob/2d2642f4832ebc45cb7d5ba9430b933d953b94f2/ShellPkg/Application/Shell/ShellProtocol.c#L1700 Signed-off-by: Ayush Singh <[email protected]>
As per rust-lang#117276, this PR moves `sys_common::net` and the `sys::pal::net` into the newly created `sys::net` module. In order to support rust-lang#135141, I've moved all the current network code into a separate `connection` module, future functions like `hostname` can live in separate modules. I'll probably do a follow-up PR and clean up some of the actual code, this is mostly just a reorganization.
i am not quite sure how this failure is in any way related to this pr, since i am only touching inherent functions on str? but sure.
This includes [1] which is required for LLVM 20. [1]: rust-lang/compiler-builtins#752
tests/ui/match/enum-and-break-in-match-issue-41213.rs and tests/ui/while/while-let-scope-issue-40235.rs doesn't need to be run.
Add a test for infinite recursion of an arbitrary self type. These diagnostics aren't perfect (especially the repetition of the statement that there's too much recursion) but for now at least let's add a test to confirm that such diagnostics are emitted.
…, r=GuillaumeGomez cg_gcc: Directly use rustc_abi instead of reexports These reexports will be going away soonish.
…r=davidtwco tests: Port `split-debuginfo` to rmake.rs Part of rust-lang#121876. This PR supersedes rust-lang#128754 and is co-authored with `@Oneirical.` ## Known limitations - In general, like the `Makefile` version, this test in its present form is also somewhat funny because for the most part it merely checks for existence/absence of output artifacts but makes no attempt to actually check if the debuginfo is at all usable. ## Changes This PR ports `tests/run-make/split-debuginfo` to rmake.rs. This is an **initial** port, and certainly could be cleaned up and/or enhanced. The original Makefile version had several functional problems. I fixed some of them, but also left some existing issues as-is. 1. The linux/non-linux final branch had a conditional interpolation of `UNSTABLE_OPTIONS := -Zunstable-options`. However, one of the use sites was `-C $(UNSTABLE_OPTIONS) split-debuginfo`. This indicates to me that this run-make test is not run in CI under a non-linux + non-windows + non-darwin environment, because that would've failed as this would expand to `-C -Zunstable-options split-debuginfo`. I fixed this in the rmake.rs version, but I'm not sure if this distinction is worth keeping at all if it's not tested in CI. 2. There are several comments that were discovered to be wrong. I tried to fix them in the rmake.rs version as well. 3. The check for path remapping / lack of path remapping through ```make objdump -Wi $(TMPDIR)/foo | grep DW_AT_GNU_dwo_name | (! grep $(TMPDIR)) || exit 1 ``` is incorrect, because that looks at the single line of that contains `DW_AT_GNU_dwo_name`. This is unfortunately wrong because empirical evidence shows that with `objdump`[^objdump], the check actually needs to look at the attribute value of `DW_AT_comp_dir` on the previous line not `DW_AT_GNU_dwo_name`[^gnu-ext]. Example output of `objdump`: ```text <10> DW_AT_comp_dir : (indirect string, offset: 0xafb48): /home/joe/repos/rust <14> DW_AT_GNU_dwo_name: (indirect string, offset: 0x5d1b0): foo.foo.fc848df41df7a00d-cgu.0.rcgu.dwo ``` In the rmake.rs version I used a 2-line sliding window to check for `DW_AT_comp_dir` and `DW_AT_GNU_dwo_name`, but to look at `DW_AT_comp_dir` specifically. 4. I included a bunch of FIXMEs and ENHANCEMENTs I noticed regarding the test because I didn't want to fix them in this initial port[^enhancement]. 5. The Makefile version didn't test *anything* on Windows (both windows-msvc and windows-gnu). I added some *very* basic and *very* sparse checks for windows-msvc, but I am not willing to spend the effort to expand test coverage to windows-gnu in this initial port. 6. This run-make test is way too big. But I didn't want to expend the effort of breaking this up in this initial port. [^objdump]: the output format differs between `objdump` and `llvm-objdump`, but the same is true for `llvm-objdump` that this is looking at the wrong line. [^gnu-ext]: AFAICT that is a GNU DWARF attribute extension, since it isn't mentioned in DWARFv5 spec [^enhancement]: For instance, the previous path remapping check could in theory be precisely inspected by inspecting `.debug_info` section to look for attribute value of `DW_AT_comp_dir`. But that involves resolving the value of the indirect string, which means you have to: (1) look for offset into string offset table and (2) use *that* offset to find the string itself in the string table. The split part of "split-debuginfo" makes this murky for me, so I wasn't able to replace `llvm-objdump` textual output substring matches with more precise `object` + `gimli` inspections. ## Review advice - I'm sorry for how long the rmake.rs test ended up, but a lot of it is comments and just vertical space due to formatting. If there's any ways to make this test less long / convoluted, advice would be appreciated. - This PR *intentionally* introduces several intermediate commits for the `Makefile`, mostly to illustrate the problems I discovered when looking at the original `Makefile` version. This is intended to highlight the existing problems in the `Makefile` version for the reviewer[^squash]. - There are several intentional non-functional commits: 1. Reindent the `Makefile` to make the platform conditional gating more obvious. 2. Collapse nested if-else branches into an else if construct, which is not supported by GNU Make 3.80. 3. Remove all redundant `-C debuginfo=2` when `-g` is already specified. - This PR is best reviewed commit-by-commit. [^squash]: I intend to squash these intermediate commits away after the reviewer concludes that the current form of the rmake.rs test is acceptable for merge. Before then, I'll keep them to help with review. --- try-job: x86_64-msvc try-job: i686-msvc try-job: i686-mingw try-job: x86_64-mingw-1 try-job: x86_64-apple-1 try-job: aarch64-apple try-job: test-various
…ieril Make cenum_impl_drop_cast a hard error This changes the `cenum_impl_drop_cast` lint to be a hard error. This lint has been deny-by-default and warning in dependencies since rust-lang#97652 about 2.5 years ago. Closes rust-lang#73333
Use +secure-plt for powerpc-unknown-linux-gnu{,spe} Fixes rust-lang#136131 See that issue for details. I'm not sure about the policy about baseline on these platforms (there is no [platform support doc](https://doc.rust-lang.org/nightly/rustc/platform-support.html) for them), but it seems that the Debian/Ubuntu's cross-compiler (powerpc-linux-gnu-gcc) already uses --enable-secureplt at least as of Debian 9 (stretch) and Ubuntu 14.04. ``` $ cat /etc/os-release | grep VERSION_ID VERSION_ID="9" $ powerpc-linux-gnu-gcc -v Using built-in specs. COLLECT_GCC=powerpc-linux-gnu-gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc-cross/powerpc-linux-gnu/6/lto-wrapper Target: powerpc-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Debian 6.3.0-18' --with-bugurl=file:///usr/share/doc/gcc-6/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-6 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-powerpc-cross/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-powerpc-cross --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-powerpc-cross --with-arch-directory=ppc --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libgcj --enable-objc-gc=auto --enable-secureplt --disable-softfloat --with-cpu=default32 --disable-softfloat --enable-targets=powerpc-linux,powerpc64-linux --enable-multiarch --with-long-double-128 --enable-multilib --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=powerpc-linux-gnu --program-prefix=powerpc-linux-gnu- --includedir=/usr/powerpc-linux-gnu/include Thread model: posix gcc version 6.3.0 20170516 (Debian 6.3.0-18) ``` ``` $ cat /etc/os-release | grep VERSION_ID VERSION_ID="14.04" $ cat /etc/debian_version jessie/sid $ powerpc-linux-gnu-gcc -v Using built-in specs. COLLECT_GCC=powerpc-linux-gnu-gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc-cross/powerpc-linux-gnu/4.8/lto-wrapper Target: powerpc-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.4-2ubuntu1~14.04.1' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/powerpc-linux-gnu/include/c++/4.8.4 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --disable-libitm --disable-libsanitizer --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-powerpc-cross/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-powerpc-cross --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-powerpc-cross --with-arch-directory=ppc --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libgcj --enable-objc-gc --enable-secureplt --disable-softfloat --with-cpu=default32 --disable-softfloat --enable-targets=powerpc-linux,powerpc64-linux --enable-multiarch --disable-werror --with-long-double-128 --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=powerpc-linux-gnu --program-prefix=powerpc-linux-gnu- --includedir=/usr/powerpc-linux-gnu/include Thread model: posix gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.1) ``` cc ```@glaubitz``` (who added powerpc-unknown-linux-gnuspe in rust-lang#48484) r? tgross35 ```@rustbot``` label +O-PowerPC +O-linux-gnu try-job: dist-powerpc-linux try-job: dist-powerpc64-linux try-job: dist-powerpc64le-linux try-job: dist-various-1 try-job: dist-various-2 try-job: aarch64-gnu
…eril Reject negative literals for unsigned or char types in pattern ranges and literals It sucks a bit that we have to duplicate the work here (normal expressions just get this for free from the `ExprKind::UnOp(UnOp::Neg, ...)` typeck logic. In rust-lang#134228 I caused ```rust fn main() { match 42_u8 { -10..255 => {}, _ => {} } } ``` to just compile without even a lint. I can't believe we didn't have tests for this Amusingly rust-lang#136302 will also register a delayed bug in `lit_to_const` for this, so we'll have a redundancy if something like this fails again.
Rollup of 12 pull requests Successful merges: - rust-lang#132547 (cg_gcc: Directly use rustc_abi instead of reexports) - rust-lang#135572 (tests: Port `split-debuginfo` to rmake.rs) - rust-lang#135964 (Make cenum_impl_drop_cast a hard error) - rust-lang#136154 (Use +secure-plt for powerpc-unknown-linux-gnu{,spe}) - rust-lang#136304 (Reject negative literals for unsigned or char types in pattern ranges and literals) - rust-lang#136418 (uefi: process: Add support for command environment variables) - rust-lang#136449 (std: move network code into `sys`) - rust-lang#136517 (implement inherent str constructors) - rust-lang#136536 (Rename and Move some UI tests to more suitable subdirs) - rust-lang#136537 (Update `compiler-builtins` to 0.1.145) - rust-lang#136555 (Rename `slice::take...` methods to `split_off...`) - rust-lang#136567 (Arbitrary self types v2: recursion test) r? `@ghost` `@rustbot` modify labels: rollup
💔 Test failed - checks-actions |
Can I help you? @bors retry |
⌛ Testing commit eeef079 with merge 6741521dc478182392806e816e919a36be5a2ba2... |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR:
previous master: a9730c3b5f In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (6741521): comparison URL. Overall result: ❌ regressions - no action needed@rustbot label: -perf-regression Instruction countThis is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.
Max RSS (memory usage)Results (primary -1.8%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 776.778s -> 777.594s (0.11%) |
Successful merges:
split-debuginfo
to rmake.rs #135572 (tests: Portsplit-debuginfo
to rmake.rs)sys
#136449 (std: move network code intosys
)compiler-builtins
to 0.1.145 #136537 (Updatecompiler-builtins
to 0.1.145)slice::take...
methods tosplit_off...
#136555 (Renameslice::take...
methods tosplit_off...
)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup