eos icon indicating copy to clipboard operation
eos copied to clipboard

eosiocpp crashed when generating abi

Open spartucus opened this issue 8 years ago • 2 comments

VirtualBox:~/work/contract/EOSDACRandom$ eosiocpp -g eosdacrandom.abi eosdacrandom.cpp 
1815853ms thread-0   abi_generator.hpp:68          ricardian_contracts  ] Warning, no ricardian clauses found for eosdacrandom

1815853ms thread-0   abi_generator.hpp:75          ricardian_contracts  ] Warning, no ricardian contract found for setsize

1815853ms thread-0   abi_generator.hpp:75          ricardian_contracts  ] Warning, no ricardian contract found for sendseed

1815853ms thread-0   abi_generator.hpp:75          ricardian_contracts  ] Warning, no ricardian contract found for sendhash

1815853ms thread-0   abi_generator.hpp:75          ricardian_contracts  ] Warning, no ricardian contract found for regrequest

/usr/local/bin/eosiocpp: line 69: 15405 Segmentation fault      (core dumped) ${ABIGEN} -extra-arg=-c -extra-arg=--std=c++14 -extra-arg=--target=wasm32 -extra-arg=-nostdinc -extra-arg=-nostdinc++ -extra-arg=-DABIGEN -extra-arg=-I${EOSIO_INSTALL_DIR}/include/libc++/upstream/include -extra-arg=-I${EOSIO_INSTALL_DIR}/include/musl/upstream/include -extra-arg=-I${BOOST_INCLUDE_DIR} -extra-arg=-I${EOSIO_INSTALL_DIR}/include -extra-arg=-I$context_folder -extra-arg=-fparse-all-comments -destination-file=${outname} -verbose=0 -context=$context_folder $1 --

It seems like that vector<tuple> way is not allowed. When it is removed from struct, eosiocpp doesn't crash anymore.

// @abi table geter_info
struct geter_info
{
    name     owner;
    std::vector<std::tuple<uint64_t, uint64_t>> requestinfo; 

    uint64_t primary_key() const { return owner; }

    EOSLIB_SERIALIZE( geter_info, (owner) (requestinfo) )
};

Env:

  • OS: Ubuntu 16.04 x64
  • commit id: 9766d2f0ae6b5dad3e31323261203f57de38eb87

spartucus avatar Jun 01 '18 11:06 spartucus

so how did you solve the issue?

KennyLiu25775 avatar Jul 07 '18 23:07 KennyLiu25775

@KennyLiu25775 https://github.com/EOSIO/eos/pull/3749/commits/6bf074868ed5eae79398cbd8555d97fad67904d0

dskvr avatar Aug 10 '18 07:08 dskvr