changeset 4901:7f11c12d7a90

8009204: [dtrace] signatures returned by Java 7 jstack() are corrupted on Solaris Summary: The fix is basically a backport of JDK-7019165 (pstack issue) to jhelper.d. Reviewed-by: coleenp, sspitsyn Contributed-by: tomas.hurka@oracle.com
author sspitsyn
date Mon, 01 Jul 2013 14:13:12 -0700
parents 993dfb57c575
children cedf20e2a655
files src/os/solaris/dtrace/jhelper.d
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/os/solaris/dtrace/jhelper.d	Wed Jun 26 17:02:04 2013 +0200
+++ b/src/os/solaris/dtrace/jhelper.d	Mon Jul 01 14:13:12 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -332,12 +332,15 @@
 
   this->nameSymbol = copyin_ptr(this->constantPool +
       this->nameIndex * sizeof (pointer) + SIZE_ConstantPool);
+  /* The symbol is a CPSlot and has lower bit set to indicate metadata */
+  this->nameSymbol &= (~1); /* remove metadata lsb */
 
   this->nameSymbolLength = copyin_uint16(this->nameSymbol +
       OFFSET_Symbol_length);
 
   this->signatureSymbol = copyin_ptr(this->constantPool +
       this->signatureIndex * sizeof (pointer) + SIZE_ConstantPool);
+  this->signatureSymbol &= (~1); /* remove metadata lsb */
 
   this->signatureSymbolLength = copyin_uint16(this->signatureSymbol +
       OFFSET_Symbol_length);