Post

Replies

Boosts

Views

Activity

Reply to Simplest programs ever fail to launch (killed by Terminal) after compiling with clang. Probably a codesigning pb
Hello again ! Sorry, but I cannot find any "crash report" in the MacOS Console. On the left, I have no crash report item (Rapports d'échec in French). I have a "Diagnostic report" (Rapports de diagnostic in French), but there is nothing in it for my executable. Conversely, I now can find in the Console a "taskgated" entry : 0 déboguer 15:18:51.953388+0200 taskgated open(/Users/<...>/simplest_ever_c_program,0x0,0x1b6) = 3 (subsystem : com.apple.securityd ; category : unixio ; threadid : 0x25a16a ; PID : 1001) [quote='904760022, DTS Engineer, /thread/845014?answerId=904760022#904760022'] Well, that’s weird. What exactly is in simplest_ever_c_program.c? [/quote] #include <stdio.h> int main() { printf("Hello World ! Gratz : this progam could be run from the Terminal !\n"); return 0; } (simple, indeed :)) [quote='904760022, DTS Engineer, /thread/845014?answerId=904760022#904760022'] If you build the program in the normal way, what does this report: codesign -d -vvv a.out [/quote] $ clang simplest_ever_c_program.c $ codesign -d -vvv a.out a.out: code object is not signed at all [quote='904760022, DTS Engineer, /thread/845014?answerId=904760022#904760022'] And then what happens if you do this: % cp a.out a2.out % ./a2.out [/quote] $ clang simplest_ever_c_program.c $ cp a.out a2.out $ ./a2.out zsh: killed ./a2.out thanks again Nicolas
Topic: Code Signing SubTopic: General
20h
Reply to Simplest programs ever fail to launch (killed by Terminal) after compiling with clang. Probably a codesigning pb
Thank you Eskimo for your answer. --> there is no crash report generated (only a "killed" message) --> the Console does not report anything. However, when launching into the debuggr lldb, some info appear in the Console : Issued commands : $ gcc simplest_ever_c_program.c -o simplest_ever_c_program $ lldb simplest_ever_c_program (lldb) target create "simplest_ever_c_program" Current executable set to '<...>/simplest_ever_c_program' (x86_64). (lldb) run Process 83292 launched: '<...>/simplest_ever_c_program' (x86_64) Process 83292 exited with status = 9 (0x00000009) Terminated due to signal 9 (lldb) run error: process exited with status -1 (no such process) (note that first launch in lldb reports a crash with signal 9, while next launch fail to start with "no such process") At first launch within lldb, the Console finally reports some informations. Console reports : par défaut 12:56:32.644706+0200 kernel Allowing set_exception_ports from [debugserver] on [simplest_ever_c_program] for entitled process/debugger par défaut 12:56:32.864851+0200 tccd AUTHREQ_ATTRIBUTION: msgID=249.51, attribution={accessing={TCCDProcess: identifier=<ID of InvalidCode>, pid=83292, auid=501, euid=501, binary_path=/Users/<...>/simplest_ever_c_program}, requesting={TCCDProcess: identifier=com.apple.syspolicyd, pid=249, auid=0, euid=0, binary_path=/usr/libexec/syspolicyd}, }, erreur 12:56:32.866658+0200 tccd IDENTITY_ATTRIBUTION: Failed to copy signing info for 83292, responsible for /Users/<...>/simplest_ever_c_program: #-67062: Error Domain=NSOSStatusErrorDomain Code=-67062 "(null)" par défaut 12:56:32.867350+0200 tccd AUTHREQ_SUBJECT: msgID=249.51, subject=/Users/<...>/simplest_ever_c_program, par défaut 12:56:32.867966+0200 tccd -[TCCDAccessIdentity staticCode]: static code for: identifier /Users/<...>/simplest_ever_c_program, type: 1: 0x7fe57c545650 at /Users/<...>/simplest_ever_c_program FInally : well, dunno why at all, I discovered that using the option -fsanitize=undefined,address seems to fix the issue : $ clang -fsanitize=undefined,address simplest_ever_c_program.c $ ./a.out Hello World ! Gratz : this progam could be run from the Terminal ! Well... May be I should report again this problem in the Developper forum (... concerned with the Apple command line tools) ? Best- Nicolas
Topic: Code Signing SubTopic: General
21h
Reply to Simplest programs ever fail to launch (killed by Terminal) after compiling with clang. Probably a codesigning pb
Hello again ! Sorry, but I cannot find any "crash report" in the MacOS Console. On the left, I have no crash report item (Rapports d'échec in French). I have a "Diagnostic report" (Rapports de diagnostic in French), but there is nothing in it for my executable. Conversely, I now can find in the Console a "taskgated" entry : 0 déboguer 15:18:51.953388+0200 taskgated open(/Users/<...>/simplest_ever_c_program,0x0,0x1b6) = 3 (subsystem : com.apple.securityd ; category : unixio ; threadid : 0x25a16a ; PID : 1001) [quote='904760022, DTS Engineer, /thread/845014?answerId=904760022#904760022'] Well, that’s weird. What exactly is in simplest_ever_c_program.c? [/quote] #include <stdio.h> int main() { printf("Hello World ! Gratz : this progam could be run from the Terminal !\n"); return 0; } (simple, indeed :)) [quote='904760022, DTS Engineer, /thread/845014?answerId=904760022#904760022'] If you build the program in the normal way, what does this report: codesign -d -vvv a.out [/quote] $ clang simplest_ever_c_program.c $ codesign -d -vvv a.out a.out: code object is not signed at all [quote='904760022, DTS Engineer, /thread/845014?answerId=904760022#904760022'] And then what happens if you do this: % cp a.out a2.out % ./a2.out [/quote] $ clang simplest_ever_c_program.c $ cp a.out a2.out $ ./a2.out zsh: killed ./a2.out thanks again Nicolas
Topic: Code Signing SubTopic: General
Replies
Boosts
Views
Activity
20h
Reply to Simplest programs ever fail to launch (killed by Terminal) after compiling with clang. Probably a codesigning pb
Thank you Eskimo for your answer. --> there is no crash report generated (only a "killed" message) --> the Console does not report anything. However, when launching into the debuggr lldb, some info appear in the Console : Issued commands : $ gcc simplest_ever_c_program.c -o simplest_ever_c_program $ lldb simplest_ever_c_program (lldb) target create "simplest_ever_c_program" Current executable set to '<...>/simplest_ever_c_program' (x86_64). (lldb) run Process 83292 launched: '<...>/simplest_ever_c_program' (x86_64) Process 83292 exited with status = 9 (0x00000009) Terminated due to signal 9 (lldb) run error: process exited with status -1 (no such process) (note that first launch in lldb reports a crash with signal 9, while next launch fail to start with "no such process") At first launch within lldb, the Console finally reports some informations. Console reports : par défaut 12:56:32.644706+0200 kernel Allowing set_exception_ports from [debugserver] on [simplest_ever_c_program] for entitled process/debugger par défaut 12:56:32.864851+0200 tccd AUTHREQ_ATTRIBUTION: msgID=249.51, attribution={accessing={TCCDProcess: identifier=<ID of InvalidCode>, pid=83292, auid=501, euid=501, binary_path=/Users/<...>/simplest_ever_c_program}, requesting={TCCDProcess: identifier=com.apple.syspolicyd, pid=249, auid=0, euid=0, binary_path=/usr/libexec/syspolicyd}, }, erreur 12:56:32.866658+0200 tccd IDENTITY_ATTRIBUTION: Failed to copy signing info for 83292, responsible for /Users/<...>/simplest_ever_c_program: #-67062: Error Domain=NSOSStatusErrorDomain Code=-67062 "(null)" par défaut 12:56:32.867350+0200 tccd AUTHREQ_SUBJECT: msgID=249.51, subject=/Users/<...>/simplest_ever_c_program, par défaut 12:56:32.867966+0200 tccd -[TCCDAccessIdentity staticCode]: static code for: identifier /Users/<...>/simplest_ever_c_program, type: 1: 0x7fe57c545650 at /Users/<...>/simplest_ever_c_program FInally : well, dunno why at all, I discovered that using the option -fsanitize=undefined,address seems to fix the issue : $ clang -fsanitize=undefined,address simplest_ever_c_program.c $ ./a.out Hello World ! Gratz : this progam could be run from the Terminal ! Well... May be I should report again this problem in the Developper forum (... concerned with the Apple command line tools) ? Best- Nicolas
Topic: Code Signing SubTopic: General
Replies
Boosts
Views
Activity
21h