<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Out Of Bounds memory access</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/1cbe61ca19/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/1cbe61ca19/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/1cbe61ca19/</id><updated>2022-04-07T15:14:55.887000Z</updated><subtitle>Recent posts to Out Of Bounds memory access</subtitle><entry><title>Out Of Bounds memory access</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/1cbe61ca19/?limit=25#3edf" rel="alternate"/><published>2022-04-07T15:14:55.887000Z</published><updated>2022-04-07T15:14:55.887000Z</updated><author><name>wollvieh</name><uri>https://forge.codesys.com/u/wollvieh/</uri></author><id>https://forge.codesys.coma1859f8b65ceddecb19fd62d42dd1a31794b6fb5</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;yes, thats right!&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Out Of Bounds memory access</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/1cbe61ca19/?limit=25#7105/5c75" rel="alternate"/><published>2022-04-07T10:39:45.150000Z</published><updated>2022-04-07T10:39:45.150000Z</updated><author><name>paulpotat</name><uri>https://forge.codesys.com/u/paulpotat/</uri></author><id>https://forge.codesys.com40f1d606907769a3a005cc5742e9ee088a84d674</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;It looks really useful, thank you ! &lt;br/&gt;
If I understand correctly, this block monitors every array of my program simultaneously ?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Out Of Bounds memory access</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/1cbe61ca19/?limit=25#7105" rel="alternate"/><published>2022-04-07T10:19:56.931000Z</published><updated>2022-04-07T10:19:56.931000Z</updated><author><name>wollvieh</name><uri>https://forge.codesys.com/u/wollvieh/</uri></author><id>https://forge.codesys.comc08e9f69cfc51e819885bb7fc6458b038b948eda</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Look here, checkbounds...&lt;br/&gt;
&lt;a href="https://faq.codesys.com/plugins/servlet/mobile?contentId=3538982#content/view/3538982" rel="nofollow"&gt;https://faq.codesys.com/plugins/servlet/mobile?contentId=3538982#content/view/3538982&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Out Of Bounds memory access</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/1cbe61ca19/?limit=25#91db" rel="alternate"/><published>2022-04-07T08:14:55.378000Z</published><updated>2022-04-07T08:14:55.378000Z</updated><author><name>paulpotat</name><uri>https://forge.codesys.com/u/paulpotat/</uri></author><id>https://forge.codesys.coma57c75d85d32f498d7b97b39799f204e87b3d184</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;br/&gt;
I have a question about how CodeSys deals with out of bound accesses.&lt;br/&gt;
For example if I define an array like so :&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;test_array&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;ARRAY&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;..&lt;/span&gt;&lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="n"&gt;OF&lt;/span&gt; &lt;span class="n"&gt;BYTE&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;And in my code if I do :&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;test_array&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Surprisingly, no exception is raised and the value is written in the memory at the corresponding address. I can even modifiy the values of other variables in the programm by doing that.&lt;/p&gt;
&lt;p&gt;So my question is : is there a way to detect an out of bound exception ?&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>