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

LLVM 18: tests/assembly/targets/targets-elf.rs fails #120105

Closed
durin42 opened this issue Jan 18, 2024 · 2 comments · Fixed by #120124
Closed

LLVM 18: tests/assembly/targets/targets-elf.rs fails #120105

durin42 opened this issue Jan 18, 2024 · 2 comments · Fixed by #120124
Assignees
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.

Comments

@durin42
Copy link
Contributor

durin42 commented Jan 18, 2024

Right now I have to run with #116672 applied, but when I do several tests fail, eg:

tests/assembly/targets/targets-elf.rs#aarch64_unknown_illumos:

---- [assembly] tests/assembly/targets/targets-elf.rs#aarch64_unknown_illumos stdout ----

error in revision `aarch64_unknown_illumos`: verification with 'FileCheck' failed
status: exit status: 1
command: "/usr/local/google/home/augie/Programming/big/rust/build/x86_64-unknown-linux-gnu/llvm/build/bin/FileCheck" "--input-file" "/usr/local/google/home/augie/Programming/big/rust/build/x86_64-unknown-linux-gnu/test/assembly/targets/targets-elf.aarch64_unknown_illumos/targets-elf.s" "/usr/local/google/home/augie/Programming/big/rust/tests/assembly/targets/targets-elf.rs" "--allow-unused-prefixes" "--check-prefixes" "CHECK,NONMSVC,aarch64_unknown_illumos" "--dump-input-context" "100"
stdout: none
--- stderr -------------------------------
/usr/local/google/home/augie/Programming/big/rust/tests/assembly/targets/targets-elf.rs:633:11: error: CHECK: expected string not found in input
// CHECK: .section
          ^
/usr/local/google/home/augie/Programming/big/rust/build/x86_64-unknown-linux-gnu/test/assembly/targets/targets-elf.aarch64_unknown_illumos/targets-elf.s:1:1: note: scanning from here
 .text
^
/usr/local/google/home/augie/Programming/big/rust/build/x86_64-unknown-linux-gnu/test/assembly/targets/targets-elf.aarch64_unknown_illumos/targets-elf.s:1:2: note: possible intended match here
 .text
 ^

Input file: /usr/local/google/home/augie/Programming/big/rust/build/x86_64-unknown-linux-gnu/test/assembly/targets/targets-elf.aarch64_unknown_illumos/targets-elf.s
Check file: /usr/local/google/home/augie/Programming/big/rust/tests/assembly/targets/targets-elf.rs

-dump-input=help explains the following input dump.

Input was:
<<<<<<
             1:  .text
check:633'0     X~~~~~~ error: no match found
check:633'1      ?      possible intended match
             2:  .file "targets_elf.d90b8376a746b330-cgu.0"
check:633'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
             3:  .ident "rustc version 1.77.0-dev"
check:633'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>>>>
------------------------------------------

more are visible in our CI for LLVM/Rust HEAD

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jan 18, 2024
@durin42 durin42 added the A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. label Jan 18, 2024
@nikic
Copy link
Contributor

nikic commented Jan 18, 2024

I think this test should check for .text instead of .section.

I believe that currently this test is actually matching something like .section ".note.GNU-stack","",@progbits, which is not emitted on Solaris since llvm/llvm-project@6ef767c.

I assume the intention was to look for .section .text, but that's one of the section types for which an explicit .section is normally omitted.

@nikic
Copy link
Contributor

nikic commented Jan 19, 2024

Okay, just looking for .text doesn't work, because apparently targets-elf, despite the name, currently also includes the MachO targets.

@nikic nikic self-assigned this Jan 19, 2024
nikic added a commit to nikic/rust that referenced this issue Jan 19, 2024
On ELF, the text section is opened with ".text", on MachO with
".section __TEXT,__text".

Previously, on ELF this test was actually matching a GNU note
section, which is no longer emitted on Solaris starting with
LLVM 18.

Fixes rust-lang#120105.
nikic added a commit to nikic/rust that referenced this issue Jan 22, 2024
On ELF, the text section is opened with ".text", on MachO with
".section __TEXT,__text".

Previously, on ELF this test was actually matching a GNU note
section, which is no longer emitted on Solaris starting with
LLVM 18.

Fixes rust-lang#120105.
fmease added a commit to fmease/rust that referenced this issue Jan 23, 2024
Split assembly tests for ELF and MachO

On ELF, the text section is opened with ".text", on MachO with ".section __TEXT,__text".

Previously, on ELF this test was actually matching a GNU note section, which is no longer emitted on Solaris starting with LLVM 18.

Fixes rust-lang#120105.

r? `@davidtwco`
fmease added a commit to fmease/rust that referenced this issue Jan 24, 2024
Split assembly tests for ELF and MachO

On ELF, the text section is opened with ".text", on MachO with ".section __TEXT,__text".

Previously, on ELF this test was actually matching a GNU note section, which is no longer emitted on Solaris starting with LLVM 18.

Fixes rust-lang#120105.

r? ``@davidtwco``
fmease added a commit to fmease/rust that referenced this issue Jan 24, 2024
Split assembly tests for ELF and MachO

On ELF, the text section is opened with ".text", on MachO with ".section __TEXT,__text".

Previously, on ELF this test was actually matching a GNU note section, which is no longer emitted on Solaris starting with LLVM 18.

Fixes rust-lang#120105.

r? ```@davidtwco```
nikic added a commit to nikic/rust that referenced this issue Jan 25, 2024
On ELF, the text section is opened with ".text", on MachO with
".section __TEXT,__text".

Previously, on ELF this test was actually matching a GNU note
section, which is no longer emitted on Solaris starting with
LLVM 18.

Fixes rust-lang#120105.
compiler-errors added a commit to compiler-errors/rust that referenced this issue Jan 26, 2024
Split assembly tests for ELF and MachO

On ELF, the text section is opened with ".text", on MachO with ".section __TEXT,__text".

Previously, on ELF this test was actually matching a GNU note section, which is no longer emitted on Solaris starting with LLVM 18.

Fixes rust-lang#120105.

r? `@davidtwco`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jan 26, 2024
Split assembly tests for ELF and MachO

On ELF, the text section is opened with ".text", on MachO with ".section __TEXT,__text".

Previously, on ELF this test was actually matching a GNU note section, which is no longer emitted on Solaris starting with LLVM 18.

Fixes rust-lang#120105.

r? ``@davidtwco``
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jan 26, 2024
Split assembly tests for ELF and MachO

On ELF, the text section is opened with ".text", on MachO with ".section __TEXT,__text".

Previously, on ELF this test was actually matching a GNU note section, which is no longer emitted on Solaris starting with LLVM 18.

Fixes rust-lang#120105.

r? ```@davidtwco```
@bors bors closed this as completed in 8866449 Jan 26, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Jan 26, 2024
Rollup merge of rust-lang#120124 - nikic:fix-assembly-test, r=davidtwco

Split assembly tests for ELF and MachO

On ELF, the text section is opened with ".text", on MachO with ".section __TEXT,__text".

Previously, on ELF this test was actually matching a GNU note section, which is no longer emitted on Solaris starting with LLVM 18.

Fixes rust-lang#120105.

r? ```@davidtwco```
@fmease fmease removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants