alibaba / xquic

XQUIC Library released by Alibaba is a cross-platform implementation of QUIC and HTTP/3 protocol.
Apache License 2.0
1.65k stars 326 forks source link

[Bug]: Error in shift operation and arithmetic operation #243

Closed adcen0107 closed 1 year ago

adcen0107 commented 1 year ago

What happened?

在xqc_cubic.c的xqc_cubic_update函数实现中,line 66 ~ 70: /*

结合注释和上下文逻辑,很明显编码者相要的实现是 t =( (now + cubic->min_rtt - cubic->epoch_start) << XQC_CUBIC_TIME_SCALE) / XQC_MICROS_PER_SECOND; 所以,当前实现是一个bug。

Steps To Reproduce

查看xqc_cubic.c的xqc_cubic_update函数源码或添加打印。

Relevant log output

No response