Hard Crash on OS X and Linux (but somewhat environment dependent)

Gilles Duboscq duboscq at ssw.jku.at
Wed Dec 10 16:42:46 UTC 2014


On Wed, Dec 10, 2014 at 4:56 PM, Stefan Marr <java at stefan-marr.de> wrote:
> Hi Gilles:
>
>> On 10 Dec 2014, at 16:42, Gilles Duboscq <duboscq at ssw.jku.at> wrote:
>>
>> If you know that all path reaching this are dominated by some specific
>> check, you can use it as the condition such that the information from
>> this cast will only ever be used in those branches.
>
> Hm, well, there is no check. A Smalltalk method never has a lexical scope, and will thus never try to access the context field.
> A Smalltalk block has a lexical scope, and might access it, but it is _always_ guaranteed to have the context frame there.
> That’s what I am trying to say with the unsafeCast.
> On top of that, `context` is a final field. There is just nothing to check at runtime.

Yes but there are some objects where it's null and other where it's
not. Otherwise you could put the assert in the SBlock constructor.
So it means that in the end there is some kind of control-flow
divergence between the handling of cases where it's null (methods) and
where it's not (block). Perhaps simply through virtual dispatch?

>
> At least, I don’t really see what I could check…
>
>> In general, we're planning to remove the unsafe operations from
>> CompilerDirectives anyway.
>
> Ok, so, your suggestions would be to just get rid of all usages of CompilerDirectives already?

Yes, or at the very least, use false as the condition if there is
nothing obvious/easily accessible to use.

>
>
> Thanks
> Stefan
>
> --
> Stefan Marr
> INRIA Lille - Nord Europe
> http://stefan-marr.de/research/
>
>
>

-Gilles


More information about the graal-dev mailing list