estraier / tkrzw

a set of implementations of DBM
Apache License 2.0
169 stars 21 forks source link

make check fails on Intel Mac #20

Closed kawanet closed 3 years ago

kawanet commented 3 years ago

It fails on Intel Mac as well.

$ git log | head -1
commit 39c0a6dcc538a0f949f0770a235520bd9d9ee512

$ ./configure && make all check
(snip)
DYLD_LIBRARY_PATH=.:/usr/local/lib:  ./tkrzw_dbm_tran build casket.tkh --iter 50000 --threads 4 \
      --sync_freq 100 --rebuild --remove --params "record_crc_mode=8"
Building: num_iterations=50000 num_threads=4
.................................................. (00002500)
(snip)
.................................................. (00050000)
Building done: elapsed_time=2.360619 num_records=132999 qps=84724 mem=9407823872

DYLD_LIBRARY_PATH=.:/usr/local/lib:  ./tkrzw_dbm_tran check --restore casket.tkh
Healthy: true
Restored: false
Records: 132999
Inconsistent count: 132999 vs 111420
Inconsistent value: key=7322

make[1]: *** [check-tran] Error 1
make: *** [check] Error 2

$ tkrzw_build_util config
PACKAGE_VERSION: 0.9.21
LIBRARY_VERSION: 1.11.0
OS_NAME: Mac OS X
IS_BIG_ENDIAN: 0
PAGE_SIZE: 4096
TYPES: void*=8 short=2 int=4 long=8 long_long=8 size_t=8 float=4 double=8 long_double=16
prefix: /usr/local
includedir: /usr/local/include
libdir: /usr/local/lib
bindir: /usr/local/bin
libexecdir: /usr/local/libexec
appinc: -I/usr/local/include
applibs: -L/usr/local/lib -ltkrzw -lstdc++ -lpthread -lm -lc 

$ sysctl machdep.cpu.brand_string
machdep.cpu.brand_string: Intel(R) Core(TM) i7-8700B CPU @ 3.20GHz

$ xcodebuild -version
Xcode 12.5
Build version 12E262

$ sw_vers
ProductName:    macOS
ProductVersion: 11.3.1
BuildVersion:   20E241
estraier commented 3 years ago

Thanks for the detail report. I found a bug of memory corruption in the command tkrzw_dbm_tran. I've commited a change to fix it.

kawanet commented 3 years ago

fixed at c00eaf68b84 🎉 thank you!