Skip to content
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

Tests failing with RLP + TTmath + Clang or Mingw64 #9

Closed
mratsim opened this issue Apr 11, 2018 · 3 comments
Closed

Tests failing with RLP + TTmath + Clang or Mingw64 #9

mratsim opened this issue Apr 11, 2018 · 3 comments

Comments

@mratsim
Copy link
Contributor

mratsim commented Apr 11, 2018

But passes with GCC: see https://travis-ci.org/status-im/nimbus/builds/365142358

Error: execution of an external compiler program 'clang++ -c  -w -I/Users/travis/.nimble/pkgs/ttmath-#master  -I/Users/travis/build/status-im/nimbus/nim/lib -o /Users/travis/build/status-im/nimbus/nimcache/stdlib_system.o /Users/travis/build/status-im/nimbus/nimcache/stdlib_system.cpp' failed with exit code: 1
/Users/travis/build/status-im/nimbus/nimcache/rlp_writer.cpp:1273:2: error: no matching function for call to 'append_naEuvp5Ccas8eW7spRt2Wg'
        append_naEuvp5Ccas8eW7spRt2Wg(self, (*data).table, 4);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/travis/build/status-im/nimbus/nimcache/rlp_writer.cpp:1238:31: note: candidate function not viable: no known conversion from 'uint [4]' to 'NU *' (aka 'unsigned long long *') for 2nd argument
N_LIB_PRIVATE N_NIMCALL(void, append_naEuvp5Ccas8eW7spRt2Wg)(tyObject_RlpWriter_FzncMjzrGRTHJi822CxGrw& self, NU* list, NI listLen_0) {
                              ^
/Users/travis/build/status-im/nimbus/nim/lib/nimbase.h:243:44: note: expanded from macro 'N_NIMCALL'
#  define N_NIMCALL(rettype, name) rettype name /* no modifier */
                                           ^
1 error generated.
@mratsim
Copy link
Contributor Author

mratsim commented Apr 11, 2018

Calling Uint256.table directly gives:

/Users/…/Programming/Status/nimbus/nimcache/nimbus_state_db.cpp:461:3: error: no matching function for call to 'encode_h7fdG49aHDY58PW6mYPq9c1g'
                encode_h7fdG49aHDY58PW6mYPq9c1g((*value).table, (&encodedValue));
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/…/Programming/Status/nimbus/nimcache/nimbus_state_db.cpp:270:31: note: candidate function not viable: no known conversion from 'uint [4]' to 'NU *' (aka 'unsigned long long *') for 1st argument
N_LIB_PRIVATE N_NIMCALL(void, encode_h7fdG49aHDY58PW6mYPq9c1g)(tyArray_E4hFScS5RHYRwrczefWt3A v, tyObject_Range_mvv1otmKT6xZLlznKeDC5A* Result);
                              ^
/Users/…/.choosenim/toolchains/nim-#devel/lib/nimbase.h:243:44: note: expanded from macro 'N_NIMCALL'
#  define N_NIMCALL(rettype, name) rettype name /* no modifier */

reproduced by @coffeepots with mingw on Windows

@coffeepots
Copy link
Contributor

coffeepots commented Apr 11, 2018

Fails for mingw64:

CC: nimbus_gas_costs
failed with exit code: 1

C:\Status\BRANCHES\nimbus-Use-memrange-and-rlp-master\tests\nimcache\nimbus_state_db.cpp: In function 'void setStorage_u1XtG2ijM9aric1MWfCv6oQ(tyObject_AccountStateDBcolonObjectType__UA7Nrr9aPmeDLcrZdhIuqVQ*&, NimStringDesc*, TY_fSgjjjotfhO8wSAxXj6bfw*, TY_fSgjjjotfhO8wSAxXj6bfw*)':
C:\Status\BRANCHES\nimbus-Use-memrange-and-rlp-master\tests\nimcache\nimbus_state_db.cpp:456:66: error: cannot convert 'ttmath::uint* {aka long unsigned int*}' to 'NU* {aka long long unsigned int*}' for argument '1' to 'void encode_h7fdG49aHDY58PW6mYPq9c1g(NU*, tyObject_Range_mvv1otmKT6xZLlznKeDC5A*)'
   encode_h7fdG49aHDY58PW6mYPq9c1g((*value).table, (&encodedValue));
                                                                  ^

@mratsim
Copy link
Contributor Author

mratsim commented Apr 11, 2018

GCC and VCC works though.

@mratsim mratsim changed the title Tests failing with RLP + TTmath + Clang (and maybe VCC) Tests failing with RLP + TTmath + Clang or Mingw64 Apr 11, 2018
yglukhov added a commit that referenced this issue Apr 12, 2018
mjfh added a commit that referenced this issue Oct 12, 2023
details:
  Persistent pruning would not restore the `emptyRlp` value for the
  root node when the database becomes empty. This effects to an
  assertion exception next time the DB is accessed.

  As most unit tests run on the memory DB, this case slipped through
  unnoticed for a while (see also issue #9.)
mjfh added a commit that referenced this issue Oct 12, 2023
details:
  Persistent pruning would not restore the `emptyRlp` value for the
  root node when the database becomes empty. This effects to an
  assertion exception next time the DB is accessed.

  As most unit tests run on the memory DB, this case slipped through
  unnoticed for a while (see also issue #9.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants