<div dir="ltr">Just curious about the behaviour and performance of mprotect and VirtualProtect.  Would it be feasible to use on each FFI callout so that aberrant memory access from C code cannot corrupt the Smalltalk Image, but generate an exception that could be handled in-Image?<div><br></div><div>cheers -ben<br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 23, 2016 at 12:37 AM, GitHub <span dir="ltr"><<a href="mailto:noreply@github.com" target="_blank">noreply@github.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br>  Branch: refs/heads/Cog<br>
  Home:   <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm" rel="noreferrer" target="_blank">https://github.com/<wbr>OpenSmalltalk/opensmalltalk-vm</a><br>
  Commit: 28630b8c60c35096175f6d6fddb5cd<wbr>91d7868882<br>
      <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/28630b8c60c35096175f6d6fddb5cd91d7868882" rel="noreferrer" target="_blank">https://github.com/<wbr>OpenSmalltalk/opensmalltalk-<wbr>vm/commit/<wbr>28630b8c60c35096175f6d6fddb5cd<wbr>91d7868882</a><br>
  Author: Ronie Salgado <<a href="mailto:roniesalg@gmail.com">roniesalg@gmail.com</a>><br>
  Date:   2016-12-20 (Tue, 20 Dec 2016)<br>
<br>
  Changed paths:<br>
    M platforms/unix/vm/<wbr>sqUnixSpurMemory.c<br>
    M platforms/win32/vm/<wbr>sqWin32SpurAlloc.c<br>
<br>
  Log Message:<br>
  -----------<br>
  The extra +1 in size parameter passed to mprotect(Unix) and VirtualProtect(Windows).<br>
<br>
<br>
  Commit: 4d732c6db375be18a96a3c850f60a1<wbr>4538d2d867<br>
      <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/4d732c6db375be18a96a3c850f60a14538d2d867" rel="noreferrer" target="_blank">https://github.com/<wbr>OpenSmalltalk/opensmalltalk-<wbr>vm/commit/<wbr>4d732c6db375be18a96a3c850f60a1<wbr>4538d2d867</a><br>
  Author: Ronie Salgado <<a href="mailto:roniesalg@gmail.com">roniesalg@gmail.com</a>><br>
  Date:   2016-12-21 (Wed, 21 Dec 2016)<br>
<br>
  Changed paths:<br>
    M platforms/unix/vm/<wbr>sqUnixSpurMemory.c<br>
<br>
  Log Message:<br>
  -----------<br>
  Computing the size after rounding down the start address.<br>
<br>
<br>
  Commit: 11880398af1da706e7b61802c11985<wbr>f12bef280e<br>
      <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/11880398af1da706e7b61802c11985f12bef280e" rel="noreferrer" target="_blank">https://github.com/<wbr>OpenSmalltalk/opensmalltalk-<wbr>vm/commit/<wbr>11880398af1da706e7b61802c11985<wbr>f12bef280e</a><br>
  Author: Nicolas Cellier <<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@<wbr>gmail.com</a>><br>
  Date:   2016-12-22 (Thu, 22 Dec 2016)<br>
<br>
  Changed paths:<br>
    M platforms/unix/vm/<wbr>sqUnixSpurMemory.c<br>
    M platforms/win32/vm/<wbr>sqWin32SpurAlloc.c<br>
<br>
  Log Message:<br>
  -----------<br>
  Merge pull request #109 from ronsaldo/MProtectBug<br>
<br>
Bug when calling mprotect and VirtualAlloc with the SpurMemoryManager<br>
<br>
<br>
Compare: <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/compare/28293aa6b85e...11880398af1d" rel="noreferrer" target="_blank">https://github.com/<wbr>OpenSmalltalk/opensmalltalk-<wbr>vm/compare/28293aa6b85e...<wbr>11880398af1d</a><br></blockquote></div><br></div></div></div>