2 ms·
I assumed that param would still be reachable because foo_object is reachable. If this is not the case, is it because struct foo_object differs from the obj typ
by matheusmoreira 3y ago
I assumed that param would still be reachable because foo_object is reachable. If this is not the case, is it because struct foo_object differs from the obj type? Perhaps that causes the garbage collector to fail to find the pointers.
Will the code be correct if I ensure that every value on the stack can be recognized by the garbage collector?
If not, then I suppose the way to avoid those issues is to tell the compiler the variable is used somehow. There's the volatile keyword and also lots of compiler attributes I can use. I'm finding it pretty difficult to determine which variables need to be marked this way though.
What is the proper discipline? How did you solve the problem?
I compile with strict aliasing disabled because of problems like these... Maybe I need to disable more optimizations.