Repository navigation
Allow core dump on OSX to change directories - #6185
Conversation
| } | ||
| /* Move to specified folder before dumping */ | ||
| if (NULL != lastSep) { | ||
| lastSep[1] = '\0'; |
There was a problem hiding this comment.
This should be
lastSep[0] = '\0';
and the separator needs to be restored to fulfill the contract of this API (providing the name of the core file actually created in . As this is happening in the context of the child process, modifying filename)filename is fine.
There was a problem hiding this comment.
On further reflection, perhaps it is correct as is, the filename might be /core.NNN in which case we want to chdir("/"): I think a comment would help here.
There was a problem hiding this comment.
I copied the line from https://github.com/eclipse/omr/blob/9494694dc394aa5dce88fb4d101a9a7ed17ca38b/port/unix/omrosdump.c#L176
which also preserves the separator.
Added a comment explaining why we keep the separator.
Core dump utility would previously ignore the directory portions of the path. Signed-off-by: Mike Zhang <mike.h.zhang@ibm.com>
556c966 to
d61d967
Compare
|
@0xdaryl Please review/commit these changes |
|
Jenkins build osx |
Core dump utility would previously ignore the directory portions of the path.
Signed-off-by: Mike Zhang mike.h.zhang@ibm.com
Fixes the
testOpenJ9DiagnosticsMXBeantest failures in eclipse-openj9/openj9#13509fyi: @keithc-ca @pshipton