[runtime] Properly unlink a node in the tls slot freelist. Fixes #17290.
authorRodrigo Kumpera <kumpera@gmail.com>
Fri, 17 Jan 2014 22:54:42 +0000 (17:54 -0500)
committerRodrigo Kumpera <kumpera@gmail.com>
Fri, 17 Jan 2014 22:54:42 +0000 (17:54 -0500)
The existing search code would not update the previous pointer so we would be
always unlinking all nodes in the freelist in front of the one picked.

mono/metadata/threads.c

index 528a36bfc5fd18baabd7737ee8e944429be49d91..e7955d9d737f8bef54cca3f55f0b5389d0119bb6 100755 (executable)
@@ -3673,6 +3673,7 @@ search_tls_slot_in_freelist (StaticDataInfo *static_data, guint32 size, guint32
                                static_data->freelist = tmp->next;
                        return tmp;
                }
+               prev = tmp;
                tmp = tmp->next;
        }
        return NULL;