This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: CyaSSL library port (WIP): Space for struct corrupts other eCos-data in RAM


> Did you by any chance put your RsaKey struct on the stack, as opposed
> to static or malloced?

Yes, the RsaKey struct was put on the stack as I didn't really want to
change too much inside the code provided by CyaSSL, but at one point I tried
to allocate memory for the RsaKey struct using malloc and this struct then
indeed got correct memory. Unfortunately the test failed someplace later
then because of other structs being put on the stack as well. So I guess
changing *ALL* struct declarations to use malloc'd space would have done the
trick as well but would of course be quite some work and would have changed
the internal structure of the CyaSSL library significantly.

> You can find the stack size for the default ("main") thread in the .ecc
> file you're using. 

Thanks for the hint. I already tested this by setting the stack size to 32k
(iirc), but the tests still failed (don't know anymore if it was at the same
spot or later after further data was put on the stack).

I will stick to the individual thread-solution and provide a hint on this
issue with the port once it's done.

- Daniel



--
View this message in context: http://sourceware-org.1504.n7.nabble.com/CyaSSL-library-port-WIP-Space-for-struct-corrupts-other-eCos-data-in-RAM-tp245720p247311.html
Sent from the Sourceware - ecos-discuss mailing list archive at Nabble.com.

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]