You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Xiao-Feng Li (JIRA)" <ji...@apache.org> on 2007/05/26 07:59:16 UTC
[jira] Closed: (HARMONY-3973) drlvm][gc_gen] Race condition at
"sync_stack.h"(124-111): at sync_stack_push() and sync_stack_pop()
functions
[ https://issues.apache.org/jira/browse/HARMONY-3973?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Xiao-Feng Li closed HARMONY-3973.
---------------------------------
Resolution: Fixed
> drlvm][gc_gen] Race condition at "sync_stack.h"(124-111): at sync_stack_push() and sync_stack_pop() functions
> -------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-3973
> URL: https://issues.apache.org/jira/browse/HARMONY-3973
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Reporter: Ilya Leviev
> Assigned To: Xiao-Feng Li
> Attachments: SourceViewScreenshot-1.jpg
>
>
> TC report on thread unsafe access that result in race condition that occur during concurrent execution of sync_stack_push() and sync_stack_pop() functions
> if it not affect correctness of execution I will mark it by special API for prevention of further alarms on this race.
> Write -> Write data-race
> Memory write at "sync_stack.h":111 conflicts with a prior memory write at "sync_stack.h":124
> Stack Trace:
> Context
> Function os_thread_create "os_thread.c":37
> Function _beginthreadex "threadex.c":145
> Function EntryPoint "dllcrt0.c":323
> Function threadstartex "threadex.c":241
> Function thread_start_proc "thread_native_basic.c":711
> Function collector_thread_func "collector.cpp":181
> Function void nongen_forward_pool(struct Collector *) "fspace_nongen_forward_pool.cpp":220
> Function collector_trace_rootsets "fspace_nongen_forward_pool.cpp":171
> Function struct Vector_Block * pool_get_entry(struct Sync_Stack *) "sync_pool.h":37
> Function struct Node * sync_stack_pop(struct Sync_Stack *) "sync_stack.h":102
> 1st Access
> Function os_thread_create "os_thread.c":37
> Function _beginthreadex "threadex.c":145
> Function EntryPoint "dllcrt0.c":323
> Function threadstartex "threadex.c":241
> Function thread_start_proc "thread_native_basic.c":711
> Function collector_thread_func "collector.cpp":181
> Function void nongen_forward_pool(struct Collector *) "fspace_nongen_forward_pool.cpp":220
> Function collector_trace_rootsets "fspace_nongen_forward_pool.cpp":165
> Function void pool_put_entry(struct Sync_Stack *,void *) "sync_pool.h":44
> Function unsigned int sync_stack_push(struct Sync_Stack *,struct Node *) "sync_stack.h":124
> 121" "" " inline Boolean sync_stack_push(Sync_Stack* stack, Node* node)"
> "122" "" " {"
> "123" "" " Stack_Top cur_top = stack->top;"
> "124" "*" " node->next = stack_top_get_entry(cur_top);"
> "125" "" " POINTER_SIZE_INT new_version = stack_top_get_next_version(cur_top);"
> "126" "" " POINTER_SIZE_INT temp = stack_top_contruct(node, new_version);"
> 2nd Access
> Function os_thread_create "os_thread.c":37
> Function _beginthreadex "threadex.c":145
> Function EntryPoint "dllcrt0.c":323
> Function threadstartex "threadex.c":241
> Function thread_start_proc "thread_native_basic.c":711
> Function collector_thread_func "collector.cpp":181
> Function void nongen_forward_pool(struct Collector *) "fspace_nongen_forward_pool.cpp":220
> Function collector_trace_rootsets "fspace_nongen_forward_pool.cpp":171
> Function struct Vector_Block * pool_get_entry(struct Sync_Stack *) "sync_pool.h":37
> Function struct Node * sync_stack_pop(struct Sync_Stack *) "sync_stack.h":111
> "109" "" " temp = (POINTER_SIZE_INT)atomic_casptr((volatile void**)&stack->top, (void*)temp, (void*)cur_top);"
> "110" "" " if(temp == *(POINTER_SIZE_INT*)&cur_top){ // got it "
> "111" "*" " top_entry->next = NULL;"
> "112" "" " return top_entry;"
> "113" "" " }"
> See also Source View screenshots.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.