{"action":"closed","issue":{"url":"https://api.github.com/repos/android-ndk/ndk/issues/779","repository_url":"https://api.github.com/repos/android-ndk/ndk","labels_url":"https://api.github.com/repos/android-ndk/ndk/issues/779/labels{/name}","comments_url":"https://api.github.com/repos/android-ndk/ndk/issues/779/comments","events_url":"https://api.github.com/repos/android-ndk/ndk/issues/779/events","html_url":"https://github.com/android-ndk/ndk/issues/779","id":354730400,"node_id":"MDU6SXNzdWUzNTQ3MzA0MDA=","number":779,"title":"CRT object file requires executable stack with r18b2 but not with r17","user":{"login":"acmorrow","id":268253,"node_id":"MDQ6VXNlcjI2ODI1Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/268253?v=4","gravatar_id":"","url":"https://api.github.com/users/acmorrow","html_url":"https://github.com/acmorrow","followers_url":"https://api.github.com/users/acmorrow/followers","following_url":"https://api.github.com/users/acmorrow/following{/other_user}","gists_url":"https://api.github.com/users/acmorrow/gists{/gist_id}","starred_url":"https://api.github.com/users/acmorrow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acmorrow/subscriptions","organizations_url":"https://api.github.com/users/acmorrow/orgs","repos_url":"https://api.github.com/users/acmorrow/repos","events_url":"https://api.github.com/users/acmorrow/events{/privacy}","received_events_url":"https://api.github.com/users/acmorrow/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"rprichard","id":1572855,"node_id":"MDQ6VXNlcjE1NzI4NTU=","avatar_url":"https://avatars3.githubusercontent.com/u/1572855?v=4","gravatar_id":"","url":"https://api.github.com/users/rprichard","html_url":"https://github.com/rprichard","followers_url":"https://api.github.com/users/rprichard/followers","following_url":"https://api.github.com/users/rprichard/following{/other_user}","gists_url":"https://api.github.com/users/rprichard/gists{/gist_id}","starred_url":"https://api.github.com/users/rprichard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rprichard/subscriptions","organizations_url":"https://api.github.com/users/rprichard/orgs","repos_url":"https://api.github.com/users/rprichard/repos","events_url":"https://api.github.com/users/rprichard/events{/privacy}","received_events_url":"https://api.github.com/users/rprichard/received_events","type":"User","site_admin":false},"assignees":[{"login":"rprichard","id":1572855,"node_id":"MDQ6VXNlcjE1NzI4NTU=","avatar_url":"https://avatars3.githubusercontent.com/u/1572855?v=4","gravatar_id":"","url":"https://api.github.com/users/rprichard","html_url":"https://github.com/rprichard","followers_url":"https://api.github.com/users/rprichard/followers","following_url":"https://api.github.com/users/rprichard/following{/other_user}","gists_url":"https://api.github.com/users/rprichard/gists{/gist_id}","starred_url":"https://api.github.com/users/rprichard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rprichard/subscriptions","organizations_url":"https://api.github.com/users/rprichard/orgs","repos_url":"https://api.github.com/users/rprichard/repos","events_url":"https://api.github.com/users/rprichard/events{/privacy}","received_events_url":"https://api.github.com/users/rprichard/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/android-ndk/ndk/milestones/13","html_url":"https://github.com/android-ndk/ndk/milestone/13","labels_url":"https://api.github.com/repos/android-ndk/ndk/milestones/13/labels","id":2808957,"node_id":"MDk6TWlsZXN0b25lMjgwODk1Nw==","number":13,"title":"r18","description":"","creator":{"login":"DanAlbert","id":315852,"node_id":"MDQ6VXNlcjMxNTg1Mg==","avatar_url":"https://avatars3.githubusercontent.com/u/315852?v=4","gravatar_id":"","url":"https://api.github.com/users/DanAlbert","html_url":"https://github.com/DanAlbert","followers_url":"https://api.github.com/users/DanAlbert/followers","following_url":"https://api.github.com/users/DanAlbert/following{/other_user}","gists_url":"https://api.github.com/users/DanAlbert/gists{/gist_id}","starred_url":"https://api.github.com/users/DanAlbert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanAlbert/subscriptions","organizations_url":"https://api.github.com/users/DanAlbert/orgs","repos_url":"https://api.github.com/users/DanAlbert/repos","events_url":"https://api.github.com/users/DanAlbert/events{/privacy}","received_events_url":"https://api.github.com/users/DanAlbert/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":39,"state":"open","created_at":"2017-10-03T01:14:04Z","updated_at":"2018-09-11T18:04:30Z","due_on":null,"closed_at":null},"comments":9,"created_at":"2018-08-28T13:26:08Z","updated_at":"2018-09-11T18:04:30Z","closed_at":"2018-09-11T18:04:30Z","author_association":"NONE","body":"\r\n#### Description\r\n\r\nThe basic issue is that changing one of our scripts from running with r17 to r18b2\r\n\r\n```\r\n         unzip $SDK_PACKAGE\r\n-        yes | ./tools/bin/sdkmanager --channel=0 \\\r\n+        yes | ./tools/bin/sdkmanager --channel=1 \\\r\n```\r\n\r\nhas caused novel warnings in the `channel=1` build when linking an SCons configure probe for the availability of `-Wl,-z,noexecstack`, leading to a failed build. The following SCons configure log section demonstrates the issue:\r\n\r\n```\r\n [2018/08/28 09:12:48.828] scons: Configure: Checking if linker supports -Wl,-z,noexecstack...\r\n [2018/08/28 09:12:48.828] build/scons/8c8b3dbd/sconf_temp/conftest_46.c <-\r\n [2018/08/28 09:12:48.828]   |\r\n [2018/08/28 09:12:48.828]   |#include <stdlib.h>\r\n [2018/08/28 09:12:48.828]   |#include <stdio.h>\r\n [2018/08/28 09:12:48.828]   |int main() {\r\n [2018/08/28 09:12:48.828]   |    printf(\"Hello, World!\");\r\n [2018/08/28 09:12:48.828]   |    return EXIT_SUCCESS;\r\n [2018/08/28 09:12:48.828]   |}\r\n [2018/08/28 09:12:48.828] /data/mci/9f77cfe0c2de406a008155c85afb02f5/android_toolchain-x86_64-21/bin/clang -o build/scons/8c8b3dbd/sconf_temp/conftest_46.o -c -std=c11 -fno-omit-frame-pointer -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -Werror -Os -Wno-unused-local-typedefs -Wno-unused-function -Wno-unused-private-field -Wno-deprecated-declarations -Wno-tautological-constant-out-of-range-compare -Wno-tautological-constant-compare -Wno-tautological-unsigned-zero-compare -Wno-tautological-unsigned-enum-zero-compare -Wno-unused-const-variable -Wno-missing-braces -Wno-inconsistent-missing-override -Wno-potentially-evaluated-expression -Wno-unused-lambda-capture -Wno-exceptions -fstack-protector-strong -Werror -fPIE -D__ANDROID_API__=21 -D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR -DNDEBUG -D_XOPEN_SOURCE=700 -D_GNU_SOURCE build/scons/8c8b3dbd/sconf_temp/conftest_46.c\r\n [2018/08/28 09:12:48.828] /data/mci/9f77cfe0c2de406a008155c85afb02f5/android_toolchain-x86_64-21/bin/clang -o build/scons/8c8b3dbd/sconf_temp/conftest_46 -static-libstdc++ -fuse-ld=gold -Wl,--no-as-needed -pthread -Wl,-z,now -rdynamic -Wl,--fatal-warnings -fstack-protector-strong -Wl,--build-id -Wl,--hash-style=both -Wl,--warn-execstack -Wl,-z,noexecstack -pie build/scons/8c8b3dbd/sconf_temp/conftest_46.o  -Wl,-z,defs -lm\r\n [2018/08/28 09:12:48.828] clang70: warning: argument unused during compilation: '-static-libstdc++' [-Wunused-command-line-argument]\r\n [2018/08/28 09:12:48.828] /data/mci/9f77cfe0c2de406a008155c85afb02f5/android_toolchain-x86_64-21/bin/../lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld.gold: warning: /data/mci/9f77cfe0c2de406a008155c85afb02f5/android_toolchain-x86_64-21/bin/../sysroot/usr/lib/../lib64/crtbegin_dynamic.o: requires executable stack\r\n [2018/08/28 09:12:48.828] /data/mci/9f77cfe0c2de406a008155c85afb02f5/android_toolchain-x86_64-21/bin/../lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld.gold: warning: one or more inputs require executable stack, but -z noexecstack was given\r\n [2018/08/28 09:12:48.828] /data/mci/9f77cfe0c2de406a008155c85afb02f5/android_toolchain-x86_64-21/bin/../lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld.gold: error: treating warnings as errors\r\n [2018/08/28 09:12:48.828] clang70: error: linker command failed with exit code 1 (use -v to see invocation)\r\n [2018/08/28 09:12:48.828] scons: Configure: no\r\n```\r\n\r\nWhat is most odd here is that the file that has been detected to require an executable stack is part of the CRT:\r\n\r\n...*`crtbegin_dynamic.o: requires executable stack`*\r\n\r\nSo this is either a false positive warning/error, or the CRT in r18b2 has been damaged in such a way that it will force executable stacks in builds that do not explicitly forbid them, but fail builds that attempt to forbid them.\r\n\r\n#### Environment Details\r\n\r\n* NDK Version: r17, r18b2\r\n* Build system: SCons\r\n* Host OS: Linux, Ubuntu 16.04\r\n* Compiler: Clang \r\n* ABI: All\r\n* STL: libc++\r\n* NDK API level: 21\r\n* Device API level: Unsure\r\n"}}
{"actor":{"display_login":"DanAlbert"}}