rbatis / fastdate

fastdate

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is the call to `localtime_r` unsound in this lib?

namespaceYcZ opened this issue · comments

According to the issue of chrono, the call to localtime_r may be unsound. I'm not quite familiar to rust and cpp coding, just be curios about this.
(根据chrono库的一个issue,调用libc的localtime_r函数可能是unsound的,不知道fastdate这个库会受这个问题的影响吗?我对Rust和C++都不是很熟悉,就是比较好奇)

commented

According to the issue of chrono, the call to localtime_r may be unsound. I'm not quite familiar to rust and cpp coding, just be curios about this. (根据chrono库的一个issue,调用libc的localtime_r函数可能是unsound的,不知道fastdate这个库会受这个问题的影响吗?我对Rust和C++都不是很熟悉,就是比较好奇)

if localtime_r not thread-safe,but. in fastdate is thread-safe.
Because fastdate only once uses it to call the cache time zone once.

chrono 0.4.20 has localtime_r RiR (Rewritten in Rust) 🥳

We've updated patched ver here https://rustsec.org/advisories/RUSTSEC-2020-0159