Instruments crashes app with Hardened Runtime on macOS Mojave Unicorn Meta Zoo #1: Why another podcast? Announcing the arrival of Valued Associate #679: Cesar Manara Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!How use Instruments and display the console in Command Lines applicationsWhere is JAVA_HOME on macOS Mojave (10.14) to Lion (10.7)?Xcode 4.4.1 code signing issueApps manually installed in simulator crashes upon loadapp signed on sierra crashed on el capitanmach_override() function is failing in mojave OSX 10.14Git is not working after macOS Mojave Update (xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools)Python crashed with OpenCV in MacOS MojaveHardened runtime for Java and MojaveDowngrading OpenGL in macOS Mojave

Could a cockatrice have parasitic embryos?

Why aren't road bicycle wheels tiny?

When does Bran Stark remember Jamie pushing him?

false 'Security alert' from Google - every login generates mails from 'no-reply@accounts.google.com'

Israeli soda type drink

Is there a verb for listening stealthily?

Does every subgroup of an abelian group have to be abelian?

Is a self contained air-bullet cartridge feasible?

Will I be more secure with my own router behind my ISP's router?

Where to find documentation for `whois` command options?

What does the black goddess statue do and what is it?

Getting AggregateResult variables from Execute Anonymous Window

Putting Ant-Man on house arrest

Page Layouts : 1 column , 2 columns-left , 2 columns-right , 3 column

Does a Draconic Bloodline sorcerer's doubled proficiency bonus for Charisma checks against dragons apply to all dragon types or only the chosen one?

What do you call an IPA symbol that lacks a name (e.g. ɲ)?

How did Elite on the NES work?

Why do people think Winterfell crypts is the safest place for women, children and old people?

Why does Java have support for time zone offsets with seconds precision?

Where did Arya get these scars?

Is it accepted to use working hours to read general interest books?

Where can I find how to tex symbols for different fonts?

Does Prince Arnaud cause someone holding the Princess to lose?

What is the definining line between a helicopter and a drone a person can ride in?



Instruments crashes app with Hardened Runtime on macOS Mojave



Unicorn Meta Zoo #1: Why another podcast?
Announcing the arrival of Valued Associate #679: Cesar Manara
Data science time! April 2019 and salary with experience
The Ask Question Wizard is Live!How use Instruments and display the console in Command Lines applicationsWhere is JAVA_HOME on macOS Mojave (10.14) to Lion (10.7)?Xcode 4.4.1 code signing issueApps manually installed in simulator crashes upon loadapp signed on sierra crashed on el capitanmach_override() function is failing in mojave OSX 10.14Git is not working after macOS Mojave Update (xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools)Python crashed with OpenCV in MacOS MojaveHardened runtime for Java and MojaveDowngrading OpenGL in macOS Mojave



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I found that Xcode 10 Instruments (Leaks) would fail to attach to a command-line application signed with Hardened Runtime enabled, with the following error:




Error: Failed to attach to target process




I added the com.apple.security.get-task-allow entitlement to the application, and re-signed it. Then, instead of failing to attach, the application would crash with signal 9. When the application crashed, the following was logged to Console.app:




CODE SIGNING: process 93890[appname]: rejecting invalid page at address 0x1015f9000 from offset 0x0 in file "" (cs_mtime:0.0 == mtime:0.0) (signed:0 validated:0 tainted:0 nx:0 wpmapped:1 dirty:0 depth:0)




How do attach Instruments to this application? I am running macOS Mojave.










share|improve this question






























    0















    I found that Xcode 10 Instruments (Leaks) would fail to attach to a command-line application signed with Hardened Runtime enabled, with the following error:




    Error: Failed to attach to target process




    I added the com.apple.security.get-task-allow entitlement to the application, and re-signed it. Then, instead of failing to attach, the application would crash with signal 9. When the application crashed, the following was logged to Console.app:




    CODE SIGNING: process 93890[appname]: rejecting invalid page at address 0x1015f9000 from offset 0x0 in file "" (cs_mtime:0.0 == mtime:0.0) (signed:0 validated:0 tainted:0 nx:0 wpmapped:1 dirty:0 depth:0)




    How do attach Instruments to this application? I am running macOS Mojave.










    share|improve this question


























      0












      0








      0








      I found that Xcode 10 Instruments (Leaks) would fail to attach to a command-line application signed with Hardened Runtime enabled, with the following error:




      Error: Failed to attach to target process




      I added the com.apple.security.get-task-allow entitlement to the application, and re-signed it. Then, instead of failing to attach, the application would crash with signal 9. When the application crashed, the following was logged to Console.app:




      CODE SIGNING: process 93890[appname]: rejecting invalid page at address 0x1015f9000 from offset 0x0 in file "" (cs_mtime:0.0 == mtime:0.0) (signed:0 validated:0 tainted:0 nx:0 wpmapped:1 dirty:0 depth:0)




      How do attach Instruments to this application? I am running macOS Mojave.










      share|improve this question
















      I found that Xcode 10 Instruments (Leaks) would fail to attach to a command-line application signed with Hardened Runtime enabled, with the following error:




      Error: Failed to attach to target process




      I added the com.apple.security.get-task-allow entitlement to the application, and re-signed it. Then, instead of failing to attach, the application would crash with signal 9. When the application crashed, the following was logged to Console.app:




      CODE SIGNING: process 93890[appname]: rejecting invalid page at address 0x1015f9000 from offset 0x0 in file "" (cs_mtime:0.0 == mtime:0.0) (signed:0 validated:0 tainted:0 nx:0 wpmapped:1 dirty:0 depth:0)




      How do attach Instruments to this application? I am running macOS Mojave.







      xcode macos macos-mojave codesign xcode-instruments






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 9 at 5:05







      craig65535

















      asked Mar 9 at 4:49









      craig65535craig65535

      2,1531439




      2,1531439






















          1 Answer
          1






          active

          oldest

          votes


















          0














          I found two ways to fix this:



          1. Do not codesign with Hardened Runtime enabled - this is a good solution for debug builds, but not for a release build that you might want to notarize. Additionally, it misses out on the security protections provided by Hardened Runtime.


          2. Add another entitlement: com.apple.security.cs.disable-executable-page-protection. This works, but it concerns me that it is required. It also impacts security, but less so than the first solution.






          share|improve this answer

























            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55074082%2finstruments-crashes-app-with-hardened-runtime-on-macos-mojave%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            I found two ways to fix this:



            1. Do not codesign with Hardened Runtime enabled - this is a good solution for debug builds, but not for a release build that you might want to notarize. Additionally, it misses out on the security protections provided by Hardened Runtime.


            2. Add another entitlement: com.apple.security.cs.disable-executable-page-protection. This works, but it concerns me that it is required. It also impacts security, but less so than the first solution.






            share|improve this answer





























              0














              I found two ways to fix this:



              1. Do not codesign with Hardened Runtime enabled - this is a good solution for debug builds, but not for a release build that you might want to notarize. Additionally, it misses out on the security protections provided by Hardened Runtime.


              2. Add another entitlement: com.apple.security.cs.disable-executable-page-protection. This works, but it concerns me that it is required. It also impacts security, but less so than the first solution.






              share|improve this answer



























                0












                0








                0







                I found two ways to fix this:



                1. Do not codesign with Hardened Runtime enabled - this is a good solution for debug builds, but not for a release build that you might want to notarize. Additionally, it misses out on the security protections provided by Hardened Runtime.


                2. Add another entitlement: com.apple.security.cs.disable-executable-page-protection. This works, but it concerns me that it is required. It also impacts security, but less so than the first solution.






                share|improve this answer















                I found two ways to fix this:



                1. Do not codesign with Hardened Runtime enabled - this is a good solution for debug builds, but not for a release build that you might want to notarize. Additionally, it misses out on the security protections provided by Hardened Runtime.


                2. Add another entitlement: com.apple.security.cs.disable-executable-page-protection. This works, but it concerns me that it is required. It also impacts security, but less so than the first solution.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Mar 9 at 5:05

























                answered Mar 9 at 4:49









                craig65535craig65535

                2,1531439




                2,1531439





























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55074082%2finstruments-crashes-app-with-hardened-runtime-on-macos-mojave%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Save data to MySQL database using ExtJS and PHP [closed]2019 Community Moderator ElectionHow can I prevent SQL injection in PHP?Which MySQL data type to use for storing boolean valuesPHP: Delete an element from an arrayHow do I connect to a MySQL Database in Python?Should I use the datetime or timestamp data type in MySQL?How to get a list of MySQL user accountsHow Do You Parse and Process HTML/XML in PHP?Reference — What does this symbol mean in PHP?How does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?

                    Compiling GNU Global with universal-ctags support Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Tags for Emacs: Relationship between etags, ebrowse, cscope, GNU Global and exuberant ctagsVim and Ctags tips and trickscscope or ctags why choose one over the other?scons and ctagsctags cannot open option file “.ctags”Adding tag scopes in universal-ctagsShould I use Universal-ctags?Universal ctags on WindowsHow do I install GNU Global with universal ctags support using Homebrew?Universal ctags with emacsHow to highlight ctags generated by Universal Ctags in Vim?

                    Add ONERROR event to image from jsp tldHow to add an image to a JPanel?Saving image from PHP URLHTML img scalingCheck if an image is loaded (no errors) with jQueryHow to force an <img> to take up width, even if the image is not loadedHow do I populate hidden form field with a value set in Spring ControllerStyling Raw elements Generated from JSP tagds with Jquery MobileLimit resizing of images with explicitly set width and height attributeserror TLD use in a jsp fileJsp tld files cannot be resolved