Notice: We have migrated to GitLab launching 2024-05-01 see here: https://gitlab.rtems.org/

#3982 closed defect (fixed)

Test failures on BSPs with sbrk() support

Reported by: Sebastian Huber Owned by: Sebastian Huber
Priority: normal Milestone: 6.1
Component: test Version: 5
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description

There are some test failures on BSPs with sbrk() support such as psim, for example psxpipe01:

#0  rtems_heap_extend_via_sbrk (heap=0x30468 <_Malloc_Heap>, alloc_size=5) at /home/EB/sebastian_h/src/rtems/c/src/../../cpukit/libcsupport/src/rtems_heap_extend_via_sbrk.c:41
#1  0x00005b48 in rtems_heap_allocate_aligned_with_boundary (size=size@entry=5, alignment=alignment@entry=0, boundary=boundary@entry=0) at /home/EB/sebastian_h/src/rtems/c/src/../../cpukit/libcsupport/src/malloc_deferred.c:116
#2  0x00005930 in malloc (size=size@entry=5) at /home/EB/sebastian_h/src/rtems/c/src/../../cpukit/libcsupport/src/malloc.c:39
#3  0x0001b720 in _malloc_r (ignored=ignored@entry=0x2fa68 <_RTEMS_tasks_Objects+736>, size=size@entry=5) at /home/EB/sebastian_h/src/rtems/c/src/../../cpukit/libcsupport/src/_malloc_r.c:26
#4  0x00015ff4 in _strdup_r (reent_ptr=0x2fa68 <_RTEMS_tasks_Objects+736>, str=str@entry=0x1ce94 "/tmp") at ../../../../../../gcc-7.5.0/newlib/libc/string/strdup_r.c:10
#5  0x00015fbc in strdup (str=str@entry=0x1ce94 "/tmp") at ../../../../../../gcc-7.5.0/newlib/libc/string/strdup.c:10
#6  0x00011470 in rtems_mkdir (path=path@entry=0x1ce94 "/tmp", mode=mode@entry=511) at /home/EB/sebastian_h/src/rtems/c/src/../../cpukit/libcsupport/src/rtems_mkdir.c:133
#7  0x0000a7c8 in pipe (filsdes=filsdes@entry=0x36ce8) at /home/EB/sebastian_h/src/rtems/c/src/../../cpukit/libfs/src/pipe/pipe.c:42
#8  0x000004a0 in Init (ignored=<optimized out>) at /home/EB/sebastian_h/src/rtems/c/src/../../testsuites/psxtests/psxpipe01/init.c:65
#9  0x0000c828 in _Thread_Handler () at /home/EB/sebastian_h/src/rtems/c/src/../../cpukit/score/src/threadhandler.c:139
#10 0x0000c77c in _Thread_Get (id=<optimized out>, lock_context=<optimized out>) at /home/EB/sebastian_h/src/rtems/c/src/../../cpukit/score/src/threadget.c:43

The problem is that an rtems_heap_greedy_allocate() is ineffective due to the automatic heap extension.

Change History (3)

comment:1 Changed on 02/08/21 at 06:47:43 by Chris Johns <chrisj@…>

Resolution: fixed
Status: assignedclosed

In [changeset:"7ca3b283bac78e69f09f6e0e992abf088e7dd16c/rtems" 7ca3b28/rtems]:

Error: Processor CommitTicketReference failed
/data/trac/repo/rtems.git does not appear to be a Git repository.

comment:2 Changed on 02/08/21 at 22:33:47 by Chris Johns

Resolution: fixed
Status: closedreopened

This ticket is being reopened and extended to cover other greedy implementation. There is also rtems_workspace_greedy_allocate() and friends.

comment:3 Changed on 02/10/21 at 06:30:29 by Chris Johns <chrisj@…>

Resolution: fixed
Status: reopenedclosed

In [changeset:"03dff2019f6972f9b202b15d57ab295d706d86cd/rtems" 03dff201/rtems]:

Error: Processor CommitTicketReference failed
/data/trac/repo/rtems.git does not appear to be a Git repository.
Note: See TracTickets for help on using tickets.