#5198·json

lexer 构建与本地变更之间的 TOCTOU 竞赛导致浮点数截断

作者: jgreitemann创建于 2026年5月30日更新于 2026年8月30日
标签kind: bug

// main.cpp #include #include #include

#include <nlohmann/json.hpp>

using json = nlohmann::json;

const char *kJson = R"({"val": 99.123456})"; static constexpr double kExpected = 99.123456; static constexpr int kMaxSwitches = 10'000'000;