From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27481 invoked by alias); 14 Oct 2013 07:59:40 -0000 Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Received: (qmail 27469 invoked by uid 89); 14 Oct 2013 07:59:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: sam.nabble.com Received: from sam.nabble.com (HELO sam.nabble.com) (216.139.236.26) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Mon, 14 Oct 2013 07:59:38 +0000 Received: from tom.nabble.com ([192.168.236.105]) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1VVd3w-0001qL-Lm for ecos-discuss@ecos.sourceware.org; Mon, 14 Oct 2013 00:59:36 -0700 Date: Mon, 14 Oct 2013 07:59:00 -0000 From: Daniel Zebralla To: ecos-discuss@ecos.sourceware.org Message-ID: <1381737576653-247311.post@n7.nabble.com> In-Reply-To: <5257C1CB.9000002@impropriety.org.uk> References: <1380531306664-245720.post@n7.nabble.com> <1381479524136-247044.post@n7.nabble.com> <5257C1CB.9000002@impropriety.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: [ECOS] Re: CyaSSL library port (WIP): Space for struct corrupts other eCos-data in RAM X-SW-Source: 2013-10/txt/msg00010.txt.bz2 > 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