Closed lnkuiper closed 2 years ago
I haven't tested 32bit C++ compilation in CI, maybe there will be bugs. I'll investigate later.
@lnkuiper I tested many combinations of compile flags and failed to reproduce the bug, until I changed yyjson.c
to yyjson.cpp
and used the same flags from duckdb CI workflow.
The problem is with this combined flags: g++-5 -m32 -fPIC
. When using these flags, both reader
and writer
test cases in yyjson will fail. But everything works fine if I use gcc-5
or a higher version of gcc/g++, or remove the -m32
/-fPIC
flag.
It seems that the __asm
hint code in the read_number()
function is causing the specific error. I removed this line of code in the latest version.
@ibireme Fixing 32-bit bugs is the worst.
Thank you so much for taking the time to do this, and again thank you so much for this project!
Describe the bug When compiled with flag
-m32
reading the following JSON returnsNULL
. Reading is fine when compiling for 64-bit.Your environment
Additional context DuckDB uses yyjson for its JSON extension. We had no issues with this specific JSON string before (it is part of our tests). I updated yyjson to the latest version, and this issue occurred.