8009204: [dtrace] signatures returned by Java 7 jstack() are corrupted on Solaris
authorsspitsyn
Mon, 01 Jul 2013 14:13:12 -0700
changeset 18490 0395c370a923
parent 18489 8c798d5d60bf
child 18492 ab4fbcf75767
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
hotspot/src/os/solaris/dtrace/jhelper.d
--- a/hotspot/src/os/solaris/dtrace/jhelper.d	Wed Jun 26 17:02:04 2013 +0200
+++ b/hotspot/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);