harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ilya Leviev (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-2987) [drlvm][vmcore] [util] Race condition in vmcore\src\util\win\ia32\ nt_exception_filter.cpp stack functions
Date Fri, 12 Jan 2007 15:52:27 GMT
[drlvm][vmcore] [util] Race condition in vmcore\src\util\win\ia32\ nt_exception_filter.cpp
stack functions 
-----------------------------------------------------------------------------------------------------------

                 Key: HARMONY-2987
                 URL: https://issues.apache.org/jira/browse/HARMONY-2987
             Project: Harmony
          Issue Type: Bug
          Components: DRLVM
            Reporter: Ilya Leviev


There are 3 occurrences of thread unsafe access to follow fields that result in race condition.

static size_t common_stack_size;
static size_t common_guard_stack_size;
static size_t common_guard_page_size;

(i)
First  race condition occur during concurrent execution of  get_stack_size() and init_stack_info()
with respect to common_stack_size field.
Read -> Write data-race:
Memory write at "nt_exception_filter.cpp":175 conflicts with a prior memory read at "nt_exception_filter.cpp":161


Stack Traces:  

Context
	Function hythread_create_with_group "thread_native_basic.c":142
	Function apr_thread_create "thread.c":113
	Function _beginthreadex "threadex.c":145
	Function EntryPoint "dllcrt0.c":323
	Function threadstartex "threadex.c":241
	Function dummy_worker "thread.c":79
	Function thread_start_proc "thread_native_basic.c":723
	Function wrapper_proc "thread_java_basic.c":83
	Function vm_attach "thread_generic.cpp":193
	Function void init_stack_info(void) "nt_exception_filter.cpp":173


1st Access
	Function Opcode_INVOKEVIRTUAL "interpreter.cpp":2054
	Function interpreterInvokeVirtual "interpreter.cpp":3463
	Function interpreterInvoke "interpreter.cpp":3381
	Function void interpreter(struct StackFrame &) "interpreter.cpp":2900
	Function Opcode_INVOKEVIRTUAL "interpreter.cpp":2054
	Function interpreterInvokeVirtual "interpreter.cpp":3463
	Function interpreterInvoke "interpreter.cpp":3381
	Function void interpreter(struct StackFrame &) "interpreter.cpp":2543
	Function unsigned int get_available_stack_size(void) "nt_exception_filter.cpp":207
	Function unsigned int get_stack_size(void) "nt_exception_filter.cpp":161

2nd Access
	Function hythread_create_with_group "thread_native_basic.c":142
	Function apr_thread_create "thread.c":113
	Function _beginthreadex "threadex.c":145
	Function EntryPoint "dllcrt0.c":323
	Function threadstartex "threadex.c":241
	Function dummy_worker "thread.c":79
	Function thread_start_proc "thread_native_basic.c":723
	Function wrapper_proc "thread_java_basic.c":83
	Function vm_attach "thread_generic.cpp":193
	Function void init_stack_info(void) "nt_exception_filter.cpp":175



(ii)
Second race condition occur during concurrent execution of  get_guard_stack_size() and init_stack_info()
with respect to common_guard_stack_size field.

Read -> Write data-race: Memory write at "nt_exception_filter.cpp":176 conflicts with a
prior memory read at "nt_exception_filter.cpp":165 

Stack Traces: 

Context
	Function hythread_create_with_group "thread_native_basic.c":142
	Function apr_thread_create "thread.c":113
	Function _beginthreadex "threadex.c":145
	Function EntryPoint "dllcrt0.c":323
	Function threadstartex "threadex.c":241
	Function dummy_worker "thread.c":79
	Function thread_start_proc "thread_native_basic.c":723
	Function wrapper_proc "thread_java_basic.c":83
	Function vm_attach "thread_generic.cpp":193
	Function void init_stack_info(void) "nt_exception_filter.cpp":173


1st Access
	Function Opcode_INVOKEVIRTUAL "interpreter.cpp":2054
	Function interpreterInvokeVirtual "interpreter.cpp":3463
	Function interpreterInvoke "interpreter.cpp":3381
	Function void interpreter(struct StackFrame &) "interpreter.cpp":2900
	Function Opcode_INVOKEVIRTUAL "interpreter.cpp":2054
	Function interpreterInvokeVirtual "interpreter.cpp":3463
	Function interpreterInvoke "interpreter.cpp":3381
	Function void interpreter(struct StackFrame &) "interpreter.cpp":2543
	Function unsigned int get_available_stack_size(void) "nt_exception_filter.cpp":207
	Function unsigned int get_guard_stack_size(void) "nt_exception_filter.cpp":165

2nd Access
	Function hythread_create_with_group "thread_native_basic.c":142
	Function apr_thread_create "thread.c":113
	Function _beginthreadex "threadex.c":145
	Function EntryPoint "dllcrt0.c":323
	Function threadstartex "threadex.c":241
	Function dummy_worker "thread.c":79
	Function thread_start_proc "thread_native_basic.c":723
	Function wrapper_proc "thread_java_basic.c":83
	Function vm_attach "thread_generic.cpp":193
	Function void init_stack_info(void) "nt_exception_filter.cpp":176

(iii)
Third race condition occur during concurrent execution of  get_guard_page_size() and init_stack_info()
with respect to common_guard_page_size.

Read -> Write data-race: Memory write at "nt_exception_filter.cpp":177 conflicts with a
prior memory read at "nt_exception_filter.cpp":169 

Stack Traces:

Context
	Function hythread_create_with_group "thread_native_basic.c":142
	Function apr_thread_create "thread.c":113
	Function _beginthreadex "threadex.c":145
	Function EntryPoint "dllcrt0.c":323
	Function threadstartex "threadex.c":241
	Function dummy_worker "thread.c":79
	Function thread_start_proc "thread_native_basic.c":723
	Function wrapper_proc "thread_java_basic.c":83
	Function vm_attach "thread_generic.cpp":193
	Function void init_stack_info(void) "nt_exception_filter.cpp":173


1st Access
	Function Opcode_INVOKEVIRTUAL "interpreter.cpp":2054
	Function interpreterInvokeVirtual "interpreter.cpp":3463
	Function interpreterInvoke "interpreter.cpp":3381
	Function void interpreter(struct StackFrame &) "interpreter.cpp":2900
	Function Opcode_INVOKEVIRTUAL "interpreter.cpp":2054
	Function interpreterInvokeVirtual "interpreter.cpp":3463
	Function interpreterInvoke "interpreter.cpp":3381
	Function void interpreter(struct StackFrame &) "interpreter.cpp":2543
	Function unsigned int get_available_stack_size(void) "nt_exception_filter.cpp":207
	Function unsigned int get_guard_page_size(void) "nt_exception_filter.cpp":169

2nd Access
	Function hythread_create_with_group "thread_native_basic.c":142
	Function apr_thread_create "thread.c":113
	Function _beginthreadex "threadex.c":145
	Function EntryPoint "dllcrt0.c":323
	Function threadstartex "threadex.c":241
	Function dummy_worker "thread.c":79
	Function thread_start_proc "thread_native_basic.c":723
	Function wrapper_proc "thread_java_basic.c":83
	Function vm_attach "thread_generic.cpp":193
	Function void init_stack_info(void) "nt_exception_filter.cpp":177




-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message