Skip to content

out-of-memory in allocator.c #431

@Rrooach

Description

@Rrooach

Bug report

Required Info:

  • Operating System:
    Ubuntu 22.04
  • Installation type:
    source code
  • Version or commit hash:
    humble
  • DDS implementation:
    FastRTPS
  • Client library (if applicable):
    RCLCPP

Steps to reproduce issue

Basically, I installed ros-humble on a remote server, compiled it with address sanitizer, And when I start to boot the ros2 system and try to testing it, I get the following asan report.

Expected behavior

The system start without error.

Actual behavior

System emit an asan report

Additional information

the following is the asan report:
https://pastebin.com/5DgN1X74

it seems that the program fails to allocate a large amount of memory region when serialize message, in allocator.c:

static void *
__default_reallocate(void * pointer, size_t size, void * state)
{
  RCUTILS_CAN_RETURN_WITH_ERROR_OF(NULL);

  RCUTILS_UNUSED(state);
  return realloc(pointer, size);
}

the following is the gdb output:

https://pastebin.com/NtjqZBtP

It would be so nice of you to review this bug report. Thank you again for taking the time. Any suggestions or feedback you can provide would be helpful.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions