|
|
|
|
|
by sillysaurus
4803 days ago
|
|
Except we're talking about an invalid program. The program is invalid as written. Therefore memory barriers are the antidote because they're necessary in this situation. A tool doesn't have a purpose. It has capabilities, and understanding why something works (and why it can be relied upon) is all that matters. |
|
The problem with my program is that it casts an int32_t pointer to int16_t pointer. The correct fix is to not do that. "Fixing" the problem with a memory barrier is a step in the wrong direction.