Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Hical61/Hical
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.6.0
Choose a base ref
...
head repository: Hical61/Hical
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.6.1
Choose a head ref
  • 12 commits
  • 46 files changed
  • 1 contributor

Commits on May 12, 2026

  1. Configuration menu
    Copy the full SHA
    36108a7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6eb1e99 View commit details
    Browse the repository at this point in the history
  3. [docs] 重组 docs 目录:迁移技术文档,移除 blog/

    - 4 篇技术文档从 docs/blog/ 迁移到 docs/(logging-guide、openapi-guide、coroutine-guide、production-deployment)
    - 删除 docs/blog/ 目录
    - 修复所有交叉引用链接
    Hical61 committed May 12, 2026
    Configuration menu
    Copy the full SHA
    a0fecbb View commit details
    Browse the repository at this point in the history

Commits on May 13, 2026

  1. Configuration menu
    Copy the full SHA
    c693e12 View commit details
    Browse the repository at this point in the history
  2. [style] clang-format 修复

    Hical61 committed May 13, 2026
    Configuration menu
    Copy the full SHA
    34608e5 View commit details
    Browse the repository at this point in the history
  3. [fix] HttpServer 成员析构顺序:activeConnections_/draining_ 移到 baseLoop_ 之前

    io_context 析构时会销毁悬挂的协程帧,协程帧中 ConnectionCounter 的
    析构函数访问 activeConnections_ 和 draining_。原声明顺序导致这两个
    atomic 先于 baseLoop_(io_context) 被析构,Windows IOCP 下 scatter-gather
    write 的 completion 延迟窗口使协程更容易悬挂到 io_context 析构阶段,
    触发 use-after-free(IntegrationTest.LargeBody MSYS2 SegFault)。
    Hical61 committed May 13, 2026
    Configuration menu
    Copy the full SHA
    227a4df View commit details
    Browse the repository at this point in the history
  4. [chore] 分离 TFB 与框架对比 benchmark 入口

    - docker/bench_main.cpp: 还原为框架对比入口(含 SyncMiddleware)
    - docker/TFB/: 新建目录,存放 TFB 专用入口和配置
    - benchmark/hical/Dockerfile: 还原为 v2.6.0 版本
    - benchmark/hical/benchmark_config.json: 移至 docker/TFB/
    Hical61 committed May 13, 2026
    Configuration menu
    Copy the full SHA
    081d62a View commit details
    Browse the repository at this point in the history
  5. [perf] HTTP pipelining 优化:parse-before-read 快速路径 + 延迟 memmove

    阶段 A 头部解析循环增加前置解析:当 bufUsed > 0 时先尝试
    phr_parse_request,命中则跳过 async_read_some(零 syscall)。
    16 pipeline 场景下 15/16 请求跳过读系统调用。
    
    修复 pipelining 下 string_view 悬空 bug:memmove 从阶段 C 延迟到
    阶段 D 写响应之后执行,避免覆盖 nativeReq.target/headers 引用的
    readBuf 数据。
    
    新增 3 个 pipelining 集成测试(4 请求/16 深度/混合 404)。
    Hical61 committed May 13, 2026
    Configuration menu
    Copy the full SHA
    d3aa3a4 View commit details
    Browse the repository at this point in the history
  6. [fix] idleTimerLoop 悬空引用:steady_timer& 改为 shared_ptr<steady_timer>

    co_spawn(detached) 启动的 idleTimerLoop 协程通过裸引用持有 handleSession
    栈上的 optional<steady_timer>。handleSession 先退出时引用悬空,Windows IOCP
    下 ~io_context() 清理悬挂协程帧时偶发 SEGFAULT(IntegrationTest.KeepAlive)。
    
    修复:deadline 改为 shared_ptr<steady_timer>,idleTimerLoop 通过 shared_ptr
    持有所有权,timer 在协程退出前不被销毁。额外开销:每连接 1 次 make_shared
    (~100 ns),可忽略。
    Hical61 committed May 13, 2026
    Configuration menu
    Copy the full SHA
    cf4912e View commit details
    Browse the repository at this point in the history

Commits on May 14, 2026

  1. [fix] idleTimerLoop 悬空引用(续):cancel 后 yield 确保协程帧退出

    上一个 commit 将 steady_timer& 改为 shared_ptr 修复了 timer 悬空引用,
    但 tcp::socket& 裸引用仍在。handleSession co_return 后 socket 析构,
    若 idleTimerLoop 的 cancel completion 还未被 dispatch,协程帧仍悬挂
    持有悬空 socket 引用,~io_context() 清理时偶发 SEGFAULT。
    
    修复:deadline->cancel() 后 co_await post(executor) 让出一个调度轮次,
    单线程 io_context 保证 idleTimerLoop 在下一次 dispatch 时被 resume
    (ec=operation_aborted → break → 协程帧销毁),此后 handleSession
    安全 co_return → socket 析构,无悬空引用。
    Hical61 committed May 14, 2026
    Configuration menu
    Copy the full SHA
    d28e55c View commit details
    Browse the repository at this point in the history
  2. [fix] 回退 co_await post() yield:与 stopAllLoops 竞态导致 double-free

    上一个 commit 的 co_await post(executor) 让 handleSession 在 stop() 后仍能
    执行,ConnectionCounter 析构再次调用 stopAllLoops(),work_guard_ 被 double-free。
    ASan 在 Linux Clang CI 确定性检出。
    
    回退为仅保留 deadline->cancel()。timer 悬空引用已由 shared_ptr 修复。
    socket 引用的偶发 SEGFAULT(仅 Windows IOCP)需要通过 stopAllLoops 幂等化
    或其他架构方案解决,不适合用延长协程生命周期的方式修复。
    Hical61 committed May 14, 2026
    Configuration menu
    Copy the full SHA
    a8a4a1e View commit details
    Browse the repository at this point in the history
  3. [chore] ports: 添加 picohttpparser 正式依赖,移除 bundled 构建

    - vcpkg.json 声明 picohttpparser 为正式依赖(对应 vcpkg#51743)
    - portfile.cmake 传递 -DHICAL_USE_SYSTEM_PICOHTTPPARSER=ON
    - 新增 ports/picohttpparser/ overlay port 供非 vcpkg 用户使用
    Hical61 committed May 14, 2026
    Configuration menu
    Copy the full SHA
    2bb530c View commit details
    Browse the repository at this point in the history
Loading