<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Dynamically allocated data get overwritten</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/26013/dynamically-allocated-data-get-overwritten</link><description>--- Close. Cannot continue this case due to inability to share code (company policy). --- 
 
 Hi, I am writing an application where I need to parse data into dynamically allocated structs at system initialization. 
 I have observed that some of my</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 24 Oct 2017 03:51:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/26013/dynamically-allocated-data-get-overwritten" /><item><title>RE: Dynamically allocated data get overwritten</title><link>https://devzone.nordicsemi.com/thread/102507?ContentTypeID=1</link><pubDate>Tue, 24 Oct 2017 03:51:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e3e449fc-7144-40b3-a284-84eca34da1cc</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;I closed the question because I could only submit code if I use the support portal.&lt;/p&gt;
&lt;p&gt;But on another note, I rewrote the entire parsing section, and this time I had malloc returns NULL instead of running into these randomly corrupted data.&lt;/p&gt;
&lt;p&gt;Could it be that with my older code, I also ran out of heap and old data was randomly rewritten somehow and got corrupted? Could that happened and results in the symptoms I described here?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Dynamically allocated data get overwritten</title><link>https://devzone.nordicsemi.com/thread/102506?ContentTypeID=1</link><pubDate>Wed, 18 Oct 2017 08:30:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a204c97d-0ea3-40ce-9841-65c8d3c1d11a</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Martin,
Because the code having issue is a part of our company&amp;#39;s application, I had to extract said code out and rename stuffs a little. But I cannot reproduce the problem with the extracted code. So I am at a bind there.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Dynamically allocated data get overwritten</title><link>https://devzone.nordicsemi.com/thread/102505?ContentTypeID=1</link><pubDate>Tue, 17 Oct 2017 14:30:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3dc798b7-bc63-418a-ba3e-d7b724ab7837</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Is it possible for you to share some code showing how you do this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>