[flang-commits] [flang] [flang][runtime] Fix seg fault in intrinsic execute_command_line (PR #78126)
via flang-commits
flang-commits at lists.llvm.org
Sun Jan 14 23:54:18 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-flang-runtime
Author: SiHuaN (sihuan)
<details>
<summary>Changes</summary>
Fixes #<!-- -->77975
---
Full diff: https://github.com/llvm/llvm-project/pull/78126.diff
1 Files Affected:
- (modified) flang/runtime/execute.cpp (+1-1)
``````````diff
diff --git a/flang/runtime/execute.cpp b/flang/runtime/execute.cpp
index c327f07f5cbffe..7368f2f576519c 100644
--- a/flang/runtime/execute.cpp
+++ b/flang/runtime/execute.cpp
@@ -87,7 +87,7 @@ int TerminationCheck(int status, const Descriptor *cmdstat,
"Invalid command quit with exit status code: %d", exitStatusVal);
} else {
CheckAndStoreIntToDescriptor(cmdstat, INVALID_CL_ERR, terminator);
- CopyCharsToDescriptor(*cmdmsg, "Invalid command line");
+ CheckAndCopyCharsToDescriptor(cmdmsg, "Invalid command line");
}
}
#if defined(WIFSIGNALED) && defined(WTERMSIG)
``````````
</details>
https://github.com/llvm/llvm-project/pull/78126
More information about the flang-commits
mailing list