You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The task control bock (TCB) has an element with a 64 bit alignment requirement on some processors, but the way the OS_impl_task_internal_record_t is defined for VxWorks 7 does not enforce 64 bit alignment on a 32 bit system. This causes taskInitialize to fail.
Note the use of a char array in the structure here:
status=taskInit((WIND_TCB*)&lrec->tcb, /* address of new task's TCB */
(char*)task->task_name, vxpri, /* priority of new task */
vxflags, /* task option word */
(char*)actualstackbase, /* base of new task's stack */
actualsz, /* size (bytes) of stack needed */
(FUNCPTR)OS_VxWorks_TaskEntry, /* entry point of new task */
OS_ObjectIdToInteger(OS_ObjectIdFromToken(token)), /* 1st arg is ID */
0, 0, 0, 0, 0, 0, 0, 0, 0);
To Reproduce
Need to get into a situation where the internal task record (and tcb since it's the first element) is not on a 64 bit boundary, and get's passed into taskInitialize, on a system that errors out if a 64 bit structure element isn't on a boundary. Observed on GR712RC.
Expected behavior
Should initialize tasks successfully. As a quick test a uint64 val; was added to the internal task record, forcing alignment and the task initialization worked.
System observed on:
Hardware: GR712RC
OS: VxWorks 7
Versions: should be observable in Caelum or later
Additional context
None
Reporter Info
Jacob Hageman - NASA/GSFC
The text was updated successfully, but these errors were encountered:
Describe the bug
The task control bock (TCB) has an element with a 64 bit alignment requirement on some processors, but the way the OS_impl_task_internal_record_t is defined for VxWorks 7 does not enforce 64 bit alignment on a 32 bit system. This causes taskInitialize to fail.
Note the use of a char array in the structure here:
osal/src/os/vxworks/inc/os-impl-tasks.h
Lines 32 to 47 in 1de47bb
Used here:
osal/src/os/vxworks/src/os-impl-tasks.c
Lines 236 to 243 in 1de47bb
To Reproduce
Need to get into a situation where the internal task record (and tcb since it's the first element) is not on a 64 bit boundary, and get's passed into taskInitialize, on a system that errors out if a 64 bit structure element isn't on a boundary. Observed on GR712RC.
Expected behavior
Should initialize tasks successfully. As a quick test a
uint64 val;
was added to the internal task record, forcing alignment and the task initialization worked.System observed on:
Additional context
None
Reporter Info
Jacob Hageman - NASA/GSFC
The text was updated successfully, but these errors were encountered: