Closed oltolm closed 6 months ago
Well, I'm amazed by the fact that this issue has not been discovered before because this bug affects all AMD CPUs, although it seems like it does not generally cause the segfault.
I've pushed a commit in the i212
branch. Can you confirm that it fixes the issue?
Yes it fixes the issue. BTW you don't need to check for NULL
before calling free
. free
does nothing if the argument is NULL
.
Yes it fixes the issue. BTW you don't need to check for
NULL
before callingfree
.free
does nothing if the argument isNULL
.
You are right. The fix actually comes from calling calloc which will set the pointer to NULL so that free
won´t try to free a random memory address. I'll have a look at this, since there are other places where NULL is also checked before calling free
(and, possibly, the right thing to do is actually to have a calloc call, not to check for NULL).
It crashes on AMD.