Skip to content

rustc: Always emit uwtable on Android#50093

Merged
bors merged 1 commit into
rust-lang:masterfrom
alexcrichton:android-uwtable
Apr 21, 2018
Merged

rustc: Always emit uwtable on Android#50093
bors merged 1 commit into
rust-lang:masterfrom
alexcrichton:android-uwtable

Conversation

@alexcrichton

Copy link
Copy Markdown
Member

Long ago (#40549) we enabled the uwtable attribute on Windows by default
(even with -C panic=abort) to allow unwinding binaries for stack unwinding
information
. It looks like this same issue is plaguing
Gecko's Android platforms as well. This commit applies the same fix
as #40549 except that this time it's applied for all Android targets.

Generating a -C panic=abort binary for armv7-linux-androideabi before this
commit generated a number of cantunwind functions (detected with readelf -u)
but after this commit they all list appropriate unwind information.

Closes #49867

@alexcrichton

Copy link
Copy Markdown
Member Author

r? @michaelwoerister

@michaelwoerister

Copy link
Copy Markdown
Member

@bors r+

@bors

bors commented Apr 20, 2018

Copy link
Copy Markdown
Collaborator

📌 Commit fd85096 has been approved by michaelwoerister

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Apr 20, 2018
@bors

bors commented Apr 21, 2018

Copy link
Copy Markdown
Collaborator

⌛ Testing commit fd8509627d38bb7182f7af1546f9f3012e648bbc with merge 8b8794e0036d336342a03c3d94bf18a1d74e9666...

@bors

bors commented Apr 21, 2018

Copy link
Copy Markdown
Collaborator

💔 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 Apr 21, 2018
@rust-highfive

Copy link
Copy Markdown
Contributor

The job arm-android 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.
[01:21:24] failures:
[01:21:24] 
[01:21:24] ---- [codegen] codegen/nounwind.rs stdout ----
[01:21:24]  
[01:21:24] error: verification with 'FileCheck' failed
[01:21:24] status: exit code: 1
[01:21:24] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin/FileCheck" "--input-file" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/nounwind.ll" "/checkout/src/test/codegen/nounwind.rs"
[01:21:24] ------------------------------------------
[01:21:24] 
[01:21:24] ------------------------------------------
[01:21:24] stderr:
[01:21:24] stderr:
[01:21:24] ------------------------------------------
[01:21:24] /checkout/src/test/codegen/nounwind.rs:23:11: error: expected string not found in input
[01:21:24] // CHECK: @bar() unnamed_addr #0
[01:21:24]           ^
[01:21:24] /checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/nounwind.ll:7:36: note: scanning from here
[01:21:24] define void @foo() unnamed_addr #0 {
[01:21:24]                                    ^
[01:21:24] /checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/nounwind.ll:17:14: note: possible intended match here
[01:21:24] declare void @bar() unnamed_addr #1
[01:21:24] 
[01:21:24] ------------------------------------------
[01:21:24] 
[01:21:24] thread '[codegen] codegen/nounwind.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:2938:9
---
[01:21:24] test result: FAILED. 56 passed; 1 failed; 18 ignored; 0 measured; 0 filtered out
[01:21:24] 
[01:21:24] 
[01:21:24] 
[01:21:24] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/arm-linux-androideabi/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/codegen" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen" "--stage-id" "stage2-arm-linux-androideabi" "--mode" "codegen" "--target" "arm-linux-androideabi" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin/FileCheck" "--linker" "/android/ndk/arm-14/bin/arm-linux-androideabi-clang" "--host-rustcflags" "-Crpath -O -Zunstable-options " "--target-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/arm-linux-androideabi/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--llvm-version" "6.0.0\n" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--remote-test-client" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/remote-test-client" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "/android/ndk/arm-14" "--color" "always"
[01:21:24] 
[01:21:24] 
[01:21:24] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --target arm-linux-androideabi
[01:21:24] Build completed unsuccessfully in 1:08:34

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
Copy Markdown
Contributor

The job arm-android 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.
[01:21:24] failures:
[01:21:24] 
[01:21:24] ---- [codegen] codegen/nounwind.rs stdout ----
[01:21:24]  
[01:21:24] error: verification with 'FileCheck' failed
[01:21:24] status: exit code: 1
[01:21:24] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin/FileCheck" "--input-file" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/nounwind.ll" "/checkout/src/test/codegen/nounwind.rs"
[01:21:24] ------------------------------------------
[01:21:24] 
[01:21:24] ------------------------------------------
[01:21:24] stderr:
[01:21:24] stderr:
[01:21:24] ------------------------------------------
[01:21:24] /checkout/src/test/codegen/nounwind.rs:23:11: error: expected string not found in input
[01:21:24] // CHECK: @bar() unnamed_addr #0
[01:21:24]           ^
[01:21:24] /checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/nounwind.ll:7:36: note: scanning from here
[01:21:24] define void @foo() unnamed_addr #0 {
[01:21:24]                                    ^
[01:21:24] /checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/nounwind.ll:17:14: note: possible intended match here
[01:21:24] declare void @bar() unnamed_addr #1
[01:21:24] 
[01:21:24] ------------------------------------------
[01:21:24] 
[01:21:24] thread '[codegen] codegen/nounwind.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:2938:9
---
[01:21:24] test result: FAILED. 56 passed; 1 failed; 18 ignored; 0 measured; 0 filtered out
[01:21:24] 
[01:21:24] 
[01:21:24] 
[01:21:24] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/arm-linux-androideabi/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/codegen" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen" "--stage-id" "stage2-arm-linux-androideabi" "--mode" "codegen" "--target" "arm-linux-androideabi" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin/FileCheck" "--linker" "/android/ndk/arm-14/bin/arm-linux-androideabi-clang" "--host-rustcflags" "-Crpath -O -Zunstable-options " "--target-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/arm-linux-androideabi/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--llvm-version" "6.0.0\n" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--remote-test-client" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/remote-test-client" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "/android/ndk/arm-14" "--color" "always"
[01:21:24] 
[01:21:24] 
[01:21:24] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --target arm-linux-androideabi
[01:21:24] Build completed unsuccessfully in 1:08:34

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 kennytm 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-review Status: Awaiting review from the assignee but also interested parties. labels Apr 21, 2018
Long ago (rust-lang#40549) we enabled the `uwtable` attribute on Windows by default
(even with `-C panic=abort`) to allow unwinding binaries for [stack unwinding
information][winstack]. It looks like this same issue is [plaguing][arm1]
Gecko's Android platforms [as well][arm2]. This commit applies the same fix
as rust-lang#40549 except that this time it's applied for all Android targets.

Generating a `-C panic=abort` binary for `armv7-linux-androideabi` before this
commit generated a number of `cantunwind` functions (detected with `readelf -u`)
but after this commit they all list appropriate unwind information.

Closes rust-lang#49867

[winstack]: https://bugzilla.mozilla.org/show_bug.cgi?id=1302078
[arm1]: https://bugzilla.mozilla.org/show_bug.cgi?id=1453220
[arm2]: https://bugzilla.mozilla.org/show_bug.cgi?id=1451741
@alexcrichton

Copy link
Copy Markdown
Member Author

@bors: r=michaelwoerister

@bors

bors commented Apr 21, 2018

Copy link
Copy Markdown
Collaborator

📌 Commit f7439a5 has been approved by michaelwoerister

@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 Apr 21, 2018
@bors

bors commented Apr 21, 2018

Copy link
Copy Markdown
Collaborator

⌛ Testing commit f7439a5 with merge d2577ca...

bors added a commit that referenced this pull request Apr 21, 2018
rustc: Always emit `uwtable` on Android

Long ago (#40549) we enabled the `uwtable` attribute on Windows by default
(even with `-C panic=abort`) to allow unwinding binaries for [stack unwinding
information][winstack]. It looks like this same issue is [plaguing][arm1]
Gecko's Android platforms [as well][arm2]. This commit applies the same fix
as #40549 except that this time it's applied for all Android targets.

Generating a `-C panic=abort` binary for `armv7-linux-androideabi` before this
commit generated a number of `cantunwind` functions (detected with `readelf -u`)
but after this commit they all list appropriate unwind information.

Closes #49867

[winstack]: https://bugzilla.mozilla.org/show_bug.cgi?id=1302078
[arm1]: https://bugzilla.mozilla.org/show_bug.cgi?id=1453220
[arm2]: https://bugzilla.mozilla.org/show_bug.cgi?id=1451741
@bors

bors commented Apr 21, 2018

Copy link
Copy Markdown
Collaborator

☀️ Test successful - status-appveyor, status-travis
Approved by: michaelwoerister
Pushing d2577ca to master...

@bors bors merged commit f7439a5 into rust-lang:master Apr 21, 2018
@alexcrichton alexcrichton deleted the android-uwtable branch May 10, 2018 19:18
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.

-C panic=abort doesn't generate EHABI information on arm

5 participants