mainthread.cxx - unaligned stack possible

Scott Furman sfurman@rosum.com
Thu Mar 6 22:47:00 GMT 2003


eCos provides the stack for main() when building with libc startup
support and CYGSEM_LIBC_MAIN_STACK_FROM_SYSTEM is defined.  However, the
stack is declared as an array of  cyg_uint8, so there is the possibility
that it is unaligned.  The attached trivial fix ensures that the stack
is at least octlet-aligned.  (Does any architecture require an alignment
stricter than 8 bytes ?)

 

-Scott

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sourceware.org/pipermail/ecos-patches/attachments/20030306/e4be39fb/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mainthread.cxx.patch
Type: application/octet-stream
Size: 735 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/ecos-patches/attachments/20030306/e4be39fb/attachment.obj>


More information about the Ecos-patches mailing list