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

[foonathan::memory] Allocator foonathan::memory::memory_pool (at 0x559f6319a8) received invalid size/alignment 56, max supported is 48terminate called after throwing an instance of 'foonathan::memory::bad_node_size' what(): allocation node size exceeds supported maximum of allocator #123

Closed
Baren123 opened this issue Jul 30, 2021 · 10 comments

Comments

@Baren123
Copy link

The -DFOONATHAN_MEMORY_CONTAINER_NODE_SIZES_IMPL is only applicable to QNX platform and so passing this flag was not effective. The node size info was not used by memory and caused FastDDS to use custom node size implementation. The segfault occurs at line 230 of RTPSReader.cpp for the map<GUID_t, uint16_t> object.

The fix was simple, manually copy container_node_sizes_impl.hpp to src/ under the build directory.

Originally posted by @rushipatel in #103 (comment)

@Baren123
Copy link
Author

I am faced with the same problem!

@Baren123 Baren123 changed the title The -DFOONATHAN_MEMORY_CONTAINER_NODE_SIZES_IMPL is only applicable to QNX platform and so passing this flag was not effective. The node size info was not used by memory and caused FastDDS to use custom node size implementation. The segfault occurs at line 230 of RTPSReader.cpp for the map<GUID_t, uint16_t> object. [foonathan::memory] Allocator foonathan::memory::memory_pool (at 0x559f6319a8) received invalid size/alignment 56, max supported is 48terminate called after throwing an instance of 'foonathan::memory::bad_node_size' what(): allocation node size exceeds supported maximum of allocator Jul 30, 2021
@cjeeks
Copy link

cjeeks commented Aug 2, 2021

hello, I also meet the issue when executed command "./HelloWorldExample publisher" twice. I used container_node_sizes_impl.hpp file generated by executed nodesize_dbg, but this issue still remains. Is it convenient to share your ”container_node_sizes_impl.hpp“ files?

@Baren123
Copy link
Author

Baren123 commented Aug 4, 2021 via email

@cjeeks
Copy link

cjeeks commented Aug 6, 2021 via email

@dotChris90
Copy link

@Baren123 - are you compile the examples of Fast-DDS? in that case - i am contributor of Conan Center and brought the Fast-DDS package to Conan Center Index. We saw that they are using a patched version of a specific commit of this memory lib here. Fast-DDS examples are working for us just when compiling foonathan-memory with FOONATHAN_MEMORY_CHECK_ALLOCATION_SIZE = OFF.
(We currently adapting the package so fast-dds could be used via conan).

@foonathan
Copy link
Owner

The issue is the following: to determine the node sizes, memory runs a tool that generates the header. This header is then only usable on the platform where the tool has been run; if you use it with other platforms, you'll get such an error. This is usually fine, except when you're cross compiling.

As I know nothing about cross compiling, I've originally disabled the tool at all during cross compiling. This was then changed by #78 to fix #72 and by #92 to #91. But apparently it remains broken for you.

Can you share the full commands you're using to build the library? On what platform are you doing it? Are you cross-compiling, if so to what platform?

@Baren123
Copy link
Author

The problem has been solved!Thanks!

@Baren123
Copy link
Author

The problem has been solved!Thanks!

@QinChen686
Copy link

The problem has been solved!Thanks!

Hello,I have met this problem,How did you solve this problem? Could you please give some advice

@foonathan
Copy link
Owner

This is an issue with Fast-DDS, which will be resolved by the referenced PR.

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

5 participants