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

Segmentation fault (core dumped) #527

Closed
ansigroup opened this issue Jun 15, 2019 · 5 comments
Closed

Segmentation fault (core dumped) #527

ansigroup opened this issue Jun 15, 2019 · 5 comments
Labels
bug

Comments

@ansigroup
Copy link

@ansigroup ansigroup commented Jun 15, 2019

Hello,

we found an issue (cdt 1.5.0-1.6.1) on using construction which include array of self objects, like std::vector<testtab> :

TABLE testtab {
  uint64_t    id;
  std::vector<testtab> container; 

  auto primary_key() const {  return id; }
};

This construction is used in simpleassets.io (NFT standart) for attaching NFTs and FTs into others NFTs (https://github.com/CryptoLions/SimpleAssets/blob/master/include/SimpleAssets.hpp#L529)

Using CDT 1.5.0 - wasm was created but abi was failed. For deploying wasused manually modified abi file (https://github.com/CryptoLions/SimpleAssets/blob/master/SimpleAssets.abi#L539) and result was OK (img below).

image

With cdt 1.6.1. building is failed totaly and no wasm or abi is created.

Test project with construction:
test.tar.gz

Thanks,
Best Regards,
Bohdan

@jeffreyssmith2nd

This comment has been minimized.

Copy link
Contributor

@jeffreyssmith2nd jeffreyssmith2nd commented Jul 17, 2019

Confirmed on 1.6.2 as well.

@jeffreyssmith2nd

This comment has been minimized.

Copy link
Contributor

@jeffreyssmith2nd jeffreyssmith2nd commented Jul 18, 2019

Actually, I must have tested with 1.6.1. With 1.6.2 (built from source on the v1.6.2 tag), the compilation succeeds but the ABI generation fails. Can you test again with 1.6.2 and let me know what results you get?

@ansigroup

This comment has been minimized.

Copy link
Author

@ansigroup ansigroup commented Jul 18, 2019

Actually, I must have tested with 1.6.1. With 1.6.2 (built from source on the v1.6.2 tag), the compilation succeeds but the ABI generation fails. Can you test again with 1.6.2 and let me know what results you get?

tested on 1.6.2 failed both abi and wasm.

@jeffreyssmith2nd

This comment has been minimized.

Copy link
Contributor

@jeffreyssmith2nd jeffreyssmith2nd commented Aug 9, 2019

Tested again with the brew package for 1.6.2 and am indeed seeing this. Not sure why it seemed like I wasn't previously.

conr2d added a commit to b1ockchain/eoscc that referenced this issue Aug 25, 2019
`add_type` calls itself recursively to add all types it refers to.
If user-defined types refer to each other or themselves, it causes
stack overflow by cycle.

EOSIO/eosio.cdt#527
conr2d added a commit to conr2d/eosio.cdt that referenced this issue Aug 25, 2019
`add_type` calls itself recursively to add all types it refers to.
If user-defined types refer to each other or themselves, it causes
stack overflow by cycle.

EOSIO#527
@conr2d conr2d mentioned this issue Aug 25, 2019
0 of 2 tasks complete
conr2d added a commit to b1ockchain/eoscc that referenced this issue Aug 25, 2019
`add_type` calls itself recursively to add all types it refers to.
If user-defined types refer to each other or themselves, it causes
stack overflow by cycle.

EOSIO/eosio.cdt#527
@ansigroup

This comment has been minimized.

Copy link
Author

@ansigroup ansigroup commented Oct 7, 2019

Issue fixed. Just confirmed. Thank you very much.

@ansigroup ansigroup closed this Oct 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.