<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 8, 2016 at 3:04 PM, Mariano Martinez Peck <span dir="ltr">&lt;<a href="mailto:marianopeck@gmail.com" target="_blank">marianopeck@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hi guys,<div><br></div><div>I wonder if someone could give me a hand to find out why a FFI calling I am doing is crashing. In OSX it works correct but I am testing in CentOS and it fails. I wonder if it also crashes in other Linuxes too. </div><div><br></div><div>I am using latest Pharo 5.0 with Spur. To reproduce:</div><div><br></div><div>1) Get latest Pharo 5.0 and Spur via:</div><div>wget -O- <a href="http://get.pharo.org/alpha+vm" target="_blank">get.pharo.org/alpha+vm</a> | bash<br></div><div><br></div><div>2) Inside Pharo, load my prototype tool:</div><div><br></div><div><div>Gofer it</div><div><span style="white-space:pre-wrap">        </span>package: &#39;OSSubprocess&#39;;</div><div><span style="white-space:pre-wrap">        </span>url: &#39;<a href="http://smalltalkhub.com/mc/marianopeck/OSSubprocess/main" target="_blank">http://smalltalkhub.com/mc/marianopeck/OSSubprocess/main</a>&#39;;</div><div>load.</div></div><div><br></div><div>3) This is the code I am executing and it&#39;s crashing:</div><div><br></div><div><div><span style="white-space:pre-wrap">| posixSpawnFileActionsT |
posixSpawnFileActionsT := ExternalAddress allocate: 4.</span></div></div></div></blockquote><div><br></div><div><br></div><div>If I change above line with this:</div><div><br></div><div><span style="white-space:pre-wrap">posixSpawnFileActionsT :=</span> ByteArray new: 4.<br></div><div><br></div><div>Then the function does not crash but it crashes in the future  posix_spawn_file_actions_destroy(). </div><div><br></div><div><br></div><div><br></div></div>-- <br><div class="gmail_signature">Mariano<br><a href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a><br></div>
</div></div>