Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 16510 invoked from network); 28 May 2007 14:44:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 May 2007 14:44:36 -0000 Received: (qmail 691 invoked by uid 500); 28 May 2007 14:44:41 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 671 invoked by uid 500); 28 May 2007 14:44:41 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 660 invoked by uid 99); 28 May 2007 14:44:41 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 May 2007 07:44:41 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 May 2007 07:44:36 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id CE67271417D for ; Mon, 28 May 2007 07:44:15 -0700 (PDT) Message-ID: <9406369.1180363455841.JavaMail.jira@brutus> Date: Mon, 28 May 2007 07:44:15 -0700 (PDT) From: "Mikhail Fursov (JIRA)" To: commits@harmony.apache.org Subject: [jira] Updated: (HARMONY-3727) [drlvm][jit] Race condition at function Jitrino::Type::Type(enum Jitrino::Type::Tag) "type.h":144 In-Reply-To: <26537000.1177335555875.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-3727?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mikhail Fursov updated HARMONY-3727: ------------------------------------ Attachment: type.diff After a small investigation I've found that this is not a real bug because typeId is never used out of compilation session. the fix I attach adds unsafe regions markers to the problem code. > [drlvm][jit] Race condition at function Jitrino::Type::Type(enum Jitrino::Type::Tag) "type.h":144 > ------------------------------------------------------------------------------------------------- > > Key: HARMONY-3727 > URL: https://issues.apache.org/jira/browse/HARMONY-3727 > Project: Harmony > Issue Type: Bug > Components: DRLVM > Reporter: Ilya Leviev > Attachments: type.diff > > > There are thread unsafe operations at function Jitrino::Type::Type(enum Jitrino::Type::Tag) "type.h":144 > Write -> Write data-race. Memory write at "type.h":144 conflicts with a prior memory write at "type.h":144 > Here is stack traces of the issue. > Context > Function compile_do_compilation "compile.cpp":770 > Function CompileMethod "em_intf.cpp":49 > Function enum JIT_Result DrlEMImpl::compileMethod(struct Method *) "drlemimpl.cpp":540 > Function vm_compile_method "c_interface.cpp":2492 > Function enum JIT_Result compile_do_compilation_jit(struct Method *,class JIT *) "compile.cpp":657 > Function enum JIT_Result Dll_JIT::compile_method_with_params(void *,struct Method *,struct OpenMethodExecutionParams) "dll_jit_intf.h":86 > Function JIT_compile_method_with_params "drljitinterface.cpp":244 > Function Jitrino::TypeManager::TypeManager(class Jitrino::MemoryManager &) "type.cpp":341 > Function Jitrino::ValueType::ValueType(enum Jitrino::Type::Tag) "type.h":465 > Function Jitrino::Type::Type(enum Jitrino::Type::Tag) "type.h":144 > > 1st Access > Function CompileMethod "em_intf.cpp":49 > Function enum JIT_Result DrlEMImpl::compileMethod(struct Method *) "drlemimpl.cpp":540 > Function vm_compile_method "c_interface.cpp":2492 > Function enum JIT_Result compile_do_compilation_jit(struct Method *,class JIT *) "compile.cpp":657 > Function enum JIT_Result Dll_JIT::compile_method_with_params(void *,struct Method *,struct OpenMethodExecutionParams) "dll_jit_intf.h":86 > Function JIT_compile_method_with_params "drljitinterface.cpp":244 > Function void Jitrino::TypeManager::init(void) "type.cpp":379 > Function Jitrino::ObjectType::ObjectType(enum Jitrino::Type::Tag,void *,class Jitrino::TypeManager &) "type.h":501 > Function Jitrino::NamedType::NamedType(enum Jitrino::Type::Tag,void *,class Jitrino::TypeManager &) "type.h":440 > Function Jitrino::Type::Type(enum Jitrino::Type::Tag) "type.h":144 > > 2nd Access > Function compile_do_compilation "compile.cpp":770 > Function CompileMethod "em_intf.cpp":49 > Function enum JIT_Result DrlEMImpl::compileMethod(struct Method *) "drlemimpl.cpp":540 > Function vm_compile_method "c_interface.cpp":2492 > Function enum JIT_Result compile_do_compilation_jit(struct Method *,class JIT *) "compile.cpp":657 > Function enum JIT_Result Dll_JIT::compile_method_with_params(void *,struct Method *,struct OpenMethodExecutionParams) "dll_jit_intf.h":86 > Function JIT_compile_method_with_params "drljitinterface.cpp":244 > Function Jitrino::TypeManager::TypeManager(class Jitrino::MemoryManager &) "type.cpp":341 > Function Jitrino::ValueType::ValueType(enum Jitrino::Type::Tag) "type.h":465 > Function Jitrino::Type::Type(enum Jitrino::Type::Tag) "type.h":144 > > > > "" "139" "" " Singleton," > "" "140" "" " " > "" "141" "" " NumTypeTags," > "" "142" "" " InavlidTag = NumTypeTags" > "" "143" "" " };" > "0x519A0" "144" "*" " Type(Tag t) : tag(t), id(++nextTypeId) {}" <--- > "" "145" "" " virtual ~Type() {}" > "" "146" "" " " > > -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.