-
Notifications
You must be signed in to change notification settings - Fork 275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warnings and and test failure in test_resize on x86 Linux #137
Comments
Thanks for reporting! I tested this branch out on my machine, but it would be great if you could verify that these changes fix the warnings: fd7feea. |
since @slacka diddn't answer and I saw the same issue in Debian 32bit (see https://qa.debian.org/excuses.php?package=libcuckoo - regression is not really the right name, but anyway.... See https://ci.debian.net/data/autopkgtest/testing/armhf/libc/libcuckoo/16947291/log.gz and https://ci.debian.net/data/autopkgtest/testing/i386/libc/libcuckoo/16947441/log.gz) I tried it just now. Jup, still happens with the patch, see my other reply |
patch applied - no build warning actually but still
happens. |
Thanks for the reminder @reneengelhard. I was able to recompile with a 32-bit architecture and reproduce the issue. I tried fixing this in a more architecture-agnostic way: c749c88. Let me know if this works on your machine, and I can merge it in! |
thanks @manugoyal for revisiting :) Indeed that commit fixes both the warnings and the test failure |
Great, just merged! |
When building with Arch 32, I get the following warnings:
[ 62%] Building CXX object tests/unit-tests/CMakeFiles/unit_tests.dir/test_resize.cc.o
In file included from /libcuckoo/tests/unit-tests/test_resize.cc:3:
/libcuckoo/tests/unit-tests/test_resize.cc: In function 'void ____C_A_T_C_H____T_E_S_T____33()':
/libcuckoo/tests/unit-tests/test_resize.cc:49:28: warning: conversion from 'long long unsigned int' to 'size_t' {aka 'unsigned int'} changes value from '8589934592' to '0' [-Woverflow]
49 | (1ULL << 31) * slot_per_bucket) == 31);
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/libcuckoo/tests/unit-tests/test_resize.cc:51:34: warning: conversion from 'long long unsigned int' to 'size_t' {aka 'unsigned int'} changes value from '8589934596' to '4' [-Woverflow]
51 | ((1ULL << 31) + 1) * slot_per_bucket) == 32);
| ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/libcuckoo/tests/unit-tests/test_resize.cc:54:28: warning: conversion from 'long long unsigned int' to 'size_t' {aka 'unsigned int'} changes value from '9223372036854775808' to '0' [-Woverflow]
54 | (1ULL << 61) * slot_per_bucket) == 61);
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/libcuckoo/tests/unit-tests/test_resize.cc:56:34: warning: conversion from 'long long unsigned int' to 'size_t' {aka 'unsigned int'} changes value from '9223372036854775812' to '4' [-Woverflow]
56 | ((1ULL << 61) + 1) * slot_per_bucket) == 62);
| ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
A
make test
fails with/libcuckoo/tests/unit-tests/test_resize.cc:33
...............................................................................
/libcuckoo/tests/unit-tests/test_resize.cc:48: FAILED:
REQUIRE( UnitTestInternalAccess::reserve_calc( (1ULL << 31) * slot_per_bucket) == 31 )
with expansion:
0 == 31
===============================================================================
Test time = 15.10 sec ---------------------------------------------------------- Test Failed.test cases: 79 | 78 passed | 1 failed
assertions: 203952 | 203951 passed | 1 failed
The text was updated successfully, but these errors were encountered: