Files
MaaAssistantArknights/.github
Alex Gu 45aefd30d7 fix: filenum_ctrl SIGABRT (#16233) + PosixIO fork _exit + CI action SHA pin (#16502)
* fix: PosixIO::call_command 中 fork 后 child 缺少 _exit 导致 unwind 进 parent 代码

当 execlp 失败时,child 分支走 `return std::nullopt`,该子进程会从
PosixIO::call_command 一路 unwind 回 AdbController::call_command 及其
caller,跟 parent 同时跑:

- 在 child 地址空间副本中释放 m_callcmd_mutex(caller 处持有的 unique_lock)
- 后续命中 `kill(m_child, SIGTERM)` 时 child 视角 m_child==0
  → POSIX `kill(0, SIG)` 给整个进程组发信号 → 把 parent 一并杀掉
- 析构时双 close 同一 fd 号(kernel 已重用给别处)→ 关掉 parent 的
  socket / log fd → 后续 read/write 错乱

查看 git 历史发现回归引入于 #7748(perf: update PosixIO::call_command, 2023-12)。
当时 perf 重构把 child 分支结尾的 `::exit(exit_ret)` 替换成
`Log.error(...) + return std::nullopt`。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* ci: 将第三方 action 钉到 commit SHA,符合 GitHub 安全建议

https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-third-party-actions

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix: filenum_ctrl 中 std::filesystem 调用缺 error_code 导致 SIGABRT

Windows 上 debug 截图被另一进程占用时,std::filesystem 多个调用会抛 filesystem_error。
异常未被 filenum_ctrl / save_debug_image / AbstractTask::run 任一层
捕获,沿任务栈一路冒到 MaaCore 顶层(issue #16233)。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore: 清理 PosixIO 子分支 execlp 死赋值

按 Sourcery review 清掉死代码。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore: restore release package workflow

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 22:20:33 +08:00
..
2026-02-26 11:52:59 +08:00