Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
ports/167506: valgrind not working on FreeBSD 9 (maybe others), fixed upstream, patch attached
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Brett Gmoser  
View profile  
 More options May 1 2012, 8:20 pm
Newsgroups: mailing.freebsd.ports-bugs
From: bgmo...@codexterous.com (Brett Gmoser)
Date: Tue, 1 May 2012 20:20:53 -0400 (EDT)
Local: Tues, May 1 2012 8:20 pm
Subject: ports/167506: valgrind not working on FreeBSD 9 (maybe others), fixed upstream, patch attached

System: FreeBSD europa.cyber-lead.com 9.0-RELEASE FreeBSD 9.0-RELEASE #16: Wed Apr 18 07:09:54 EDT 2012 r...@europa.cyber-lead.com:/usr/obj/usr/src/sys/EUROPA

  Freebsd9 amd64 devel/valgrind port

>Description:

  Serious severity because it renders valgrind useless on FreeBSD 9. Using valgrind on any binary on my system produces the following:
  valgrind: m_debuginfo/readdwarf.c:2338 (copy_convert_CfiExpr_tree): Assertion 'srcix >= 0 && srcix < VG_(sizeXA)(srcxa)' failed.
>How-To-Repeat:

  Use valgrind on any binary on my system.
>Fix:

  This problem has been fixed upstream. More information is available here:

  https://bugs.kde.org/show_bug.cgi?id=277045

  Applying the patches there fixes the problem. For your convenience, I've pasted the patches here:

Index: coregrind/m_debuginfo/readdwarf.c
===================================================================
--- coregrind/m_debuginfo/readdwarf.c   (revision 11852)
+++ coregrind/m_debuginfo/readdwarf.c   (working copy)
@@ -2899,6 +2899,22 @@
             op = Cop_And; opname = "and"; goto binop;
          case DW_OP_mul:
             op = Cop_Mul; opname = "mul"; goto binop;
+         case DW_OP_shl:
+            op = Cop_Shl; opname = "shl"; goto binop;
+         case DW_OP_shr:
+            op = Cop_Shr; opname = "shr"; goto binop;
+         case DW_OP_eq:
+            op = Cop_Eq; opname = "eq"; goto binop;
+         case DW_OP_ge:
+            op = Cop_Ge; opname = "ge"; goto binop;
+         case DW_OP_gt:
+            op = Cop_Gt; opname = "gt"; goto binop;
+         case DW_OP_le:
+            op = Cop_Le; opname = "le"; goto binop;
+         case DW_OP_lt:
+            op = Cop_Lt; opname = "lt"; goto binop;
+         case DW_OP_ne:
+            op = Cop_Ne; opname = "ne"; goto binop;
          binop:
             POP( ix );
             POP( ix2 );
Index: coregrind/m_debuginfo/debuginfo.c
===================================================================
--- coregrind/m_debuginfo/debuginfo.c   (revision 11852)
+++ coregrind/m_debuginfo/debuginfo.c   (working copy)
@@ -1880,6 +1880,14 @@
             case Cop_Sub: return wL - wR;
             case Cop_And: return wL & wR;
             case Cop_Mul: return wL * wR;
+            case Cop_Shl: return wL << wR;
+            case Cop_Shr: return wL >> wR;
+            case Cop_Eq: return wL == wR ? 1 : 0;
+            case Cop_Ge: return wL >= wR ? 1 : 0;
+            case Cop_Gt: return wL > wR ? 1 : 0;
+            case Cop_Le: return wL <= wR ? 1 : 0;
+            case Cop_Lt: return wL < wR ? 1 : 0;
+            case Cop_Ne: return wL != wR ? 1 : 0;
             default: goto unhandled;
          }
          /*NOTREACHED*/
Index: coregrind/m_debuginfo/storage.c
===================================================================
--- coregrind/m_debuginfo/storage.c     (revision 11852)
+++ coregrind/m_debuginfo/storage.c     (working copy)
@@ -603,6 +603,14 @@
       case Cop_Sub: VG_(printf)("-"); break;
       case Cop_And: VG_(printf)("&"); break;
       case Cop_Mul: VG_(printf)("*"); break;
+      case Cop_Shl: VG_(printf)("<<"); break;
+      case Cop_Shr: VG_(printf)(">>"); break;
+      case Cop_Eq: VG_(printf)("=="); break;
+      case Cop_Ge: VG_(printf)(">="); break;
+      case Cop_Gt: VG_(printf)(">"); break;
+      case Cop_Le: VG_(printf)("<="); break;
+      case Cop_Lt: VG_(printf)("<"); break;
+      case Cop_Ne: VG_(printf)("!="); break;
       default:      vg_assert(0);
    }
 }
Index: coregrind/m_debuginfo/priv_storage.h
===================================================================
--- coregrind/m_debuginfo/priv_storage.h        (revision 11852)
+++ coregrind/m_debuginfo/priv_storage.h        (working copy)
@@ -249,7 +249,15 @@
       Cop_Add=0x321,
       Cop_Sub,
       Cop_And,
-      Cop_Mul
+      Cop_Mul,
+      Cop_Shl,
+      Cop_Shr,
+      Cop_Eq,
+      Cop_Ge,
+      Cop_Gt,
+      Cop_Le,
+      Cop_Lt,
+      Cop_Ne
    }
    CfiOp;

--- coregrind/m_debuginfo/debuginfo.c.jj  2011-07-21 16:35:56.000000000 +0200
+++ coregrind/m_debuginfo/debuginfo.c 2011-07-21 16:39:22.000000000 +0200
@@ -1883,10 +1883,10 @@ UWord evalCfiExpr ( XArray* exprs, Int i
             case Cop_Shl: return wL << wR;
             case Cop_Shr: return wL >> wR;
             case Cop_Eq: return wL == wR ? 1 : 0;
-            case Cop_Ge: return wL >= wR ? 1 : 0;
-            case Cop_Gt: return wL > wR ? 1 : 0;
-            case Cop_Le: return wL <= wR ? 1 : 0;
-            case Cop_Lt: return wL < wR ? 1 : 0;
+            case Cop_Ge: return (Word) wL >= (Word) wR ? 1 : 0;
+            case Cop_Gt: return (Word) wL > (Word) wR ? 1 : 0;
+            case Cop_Le: return (Word) wL <= (Word) wR ? 1 : 0;
+            case Cop_Lt: return (Word) wL < (Word) wR ? 1 : 0;
             case Cop_Ne: return wL != wR ? 1 : 0;
             default: goto unhandled;
          }

>Release-Note:
>Audit-Trail:
>Unformatted:

_______________________________________________
freebsd-ports-b...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs
To unsubscribe, send any mail to "freebsd-ports-bugs-unsubscr...@freebsd.org"

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Zhihao Yuan  
View profile  
 More options May 1 2012, 9:20 pm
Newsgroups: mailing.freebsd.ports-bugs
From: lich...@gmail.com (Zhihao Yuan)
Date: Wed, 2 May 2012 01:20:11 GMT
Local: Tues, May 1 2012 9:20 pm
Subject: Re: ports/167506: valgrind not working on FreeBSD 9 (maybe others), fixed upstream, patch attached
The following reply was made to PR ports/167506; it has been noted by GNATS.

From: Zhihao Yuan <lich...@gmail.com>
To: bug-follo...@FreeBSD.org, bgmo...@codexterous.com
Cc:  
Subject: Re: ports/167506: valgrind not working on FreeBSD 9 (maybe others),
 fixed upstream, patch attached
Date: Tue, 1 May 2012 20:10:44 -0500

 This is a duplicate to ports/166341. Please just commit it. I'm pretty
 sure the patch is correct and works for the recent compilers.

 --
 Zhihao Yuan, nickname lichray
 The best way to predict the future is to invent it.
 ___________________________________________________
 4BSD -- http://4bsd.biz/
_______________________________________________
freebsd-ports-b...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs
To unsubscribe, send any mail to "freebsd-ports-bugs-unsubscr...@freebsd.org"


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Brett Gmoser  
View profile  
 More options May 1 2012, 9:40 pm
Newsgroups: mailing.freebsd.ports-bugs
From: bgmo...@codexterous.com (Brett Gmoser)
Date: Wed, 2 May 2012 01:40:11 GMT
Local: Tues, May 1 2012 9:40 pm
Subject: Re: ports/167506: valgrind not working on FreeBSD 9 (maybe others), fixed upstream, patch attached
The following reply was made to PR ports/167506; it has been noted by GNATS.

From: Brett Gmoser <bgmo...@codexterous.com>
To: Zhihao Yuan <lich...@gmail.com>
Cc: bug-follo...@FreeBSD.org
Subject: Re: ports/167506: valgrind not working on FreeBSD 9 (maybe others),
 fixed upstream, patch attached
Date: Tue, 01 May 2012 21:32:13 -0400

 On 5/1/2012 9:10 PM, Zhihao Yuan wrote:
 > This is a duplicate to ports/166341. Please just commit it. I'm pretty
 > sure the patch is correct and works for the recent compilers.

 Thanks! Indeed the other submitter isolated it a bit more than I did,
 and it makes sense that it happens with binaries built with gcc46 (all
 of my ports binaries are built with gcc46, which is why I didn't notice).

_______________________________________________
freebsd-ports-b...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs
To unsubscribe, send any mail to "freebsd-ports-bugs-unsubscr...@freebsd.org"


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »