Re: [Valgrind-users] Question regarding 'Conditional jump or move depends on uninitialised value(s)'

2024-06-15 Thread Nicholas Nethercote
Hi, Re-run with the *--track-origins=yes *flag enabled and it will give you more detail about where the uninitialized value comes from. (That option isn't on by default because it makes Valgrind run more slowly.) Nick On Sun, 16 Jun 2024 at 06:13, Thomas Wollenzin wrote: > Hi, > > I'm not too

Re: [Valgrind-users] Does Valgrind support AMD Ryzen 5 5600X processors

2023-07-19 Thread Nicholas Nethercote
On Thu, 20 Jul 2023 at 00:50, John Reiser wrote: > > RTFM. It's DOCUMENTED!! https://valgrind.org/info/platforms.html > John, please refrain from this kind of aggressive language. Stuart asked a reasonable question in good faith, and doesn't deserve a response with that tone. Nick ___

Re: [Valgrind-users] RFC: proposal to remove user annotation from `cg_annotate`

2023-04-17 Thread Nicholas Nethercote
ges I want to make. Nick On Tue, 4 Apr 2023 at 15:52, Nicholas Nethercote wrote: > There were no objections, and I have now removed user annotations from > `cg_annotate`. > > Nick > > On Wed, 29 Mar 2023 at 09:03, Nicholas Nethercote > wrote: > >> Hi, >>

Re: [Valgrind-users] [Valgrind-developers] Valgrind-3.21.0.RC1 is available for testing

2023-04-16 Thread Nicholas Nethercote
Hi, My plans for the release: - I have one more significant improvement to `cg_annotate` to come, which will add merge and diff capability to it, in a way that is better than the merge/diff capability provided by `cg_merge` and `cg_diff`. - I need to update the Cachegrind docs and the

Re: [Valgrind-users] RFC: changing Cachegrind default to `--cache-sim=no`

2023-04-04 Thread Nicholas Nethercote
On Tue, 4 Apr 2023 at 19:24, David Faure wrote: > > But then, with no cache simulation and no call stacks, what's left in > `cachegrind --cache-sim=no`? > >From the email that started this thread: If you run with `--cache-sim=no` then the cache simulation is disabled and > you just get one even

Re: [Valgrind-users] RFC: proposal to remove user annotation from `cg_annotate`

2023-04-03 Thread Nicholas Nethercote
There were no objections, and I have now removed user annotations from `cg_annotate`. Nick On Wed, 29 Mar 2023 at 09:03, Nicholas Nethercote wrote: > Hi, > > I recently rewrote `cg_annotate`, `cg_diff`, and `cg_merge` in Python. The > old versions were written in Perl,

Re: [Valgrind-users] RFC: changing Cachegrind default to `--cache-sim=no`

2023-04-03 Thread Nicholas Nethercote
On Mon, 3 Apr 2023 at 21:36, David Faure wrote: > > But then, what's the difference between `cachegrind --cache-sim=no` > and `callgrind`? > > https://accu.org/journals/overload/20/111/floyd_1886/ says > "The main differences are that Callgrind has more information about the > callstack whilst ca

[Valgrind-users] RFC: changing Cachegrind default to `--cache-sim=no`

2023-04-03 Thread Nicholas Nethercote
Hi, Cachegrind has an option `--cache-sim`. If you run with `--cache-sim=yes` (the default) it tells it Cachegrind to do a full cache simulation with lots of events: Ir, I1mr, ILmr, Dr, D1mr, DLmr, Dw, D1mw, DLmw. If you run with `--cache-sim=no` then the cache simulation is disabled and you jus

[Valgrind-users] RFC: proposal to remove user annotation from `cg_annotate`

2023-03-28 Thread Nicholas Nethercote
Hi, I recently rewrote `cg_annotate`, `cg_diff`, and `cg_merge` in Python. The old versions were written in Perl, Perl, and C, respectively. The new versions are much nicer and easier to modify, and I have various ideas for improving `cg_annotate`. This email is about one of those ideas. A typica

Re: [Valgrind-users] Can massif show allocation counts in addition to sizes?

2011-11-01 Thread Nicholas Nethercote
On Wed, Oct 19, 2011 at 7:42 AM, Stephen Ehmann wrote: > I am experiencing a problem which I suspect is due to a large number of > mallocs and frees (in certain patterns) that cause the libc allocator to bog > down and hitch.  I am using massif to profile the memory usage of my program > and am tr

Re: [Valgrind-users] Fwd: Massif: --time-unit=B

2011-06-25 Thread Nicholas Nethercote
On Tue, Jun 21, 2011 at 11:56 PM, Eric Schwarz > When using 'massif' it is recommended for short programs to use > '--time-unit=B' option since o/w no or hardly any output is shown using > ms_print for visualisation [1]. My question is now regarding the units of > the x-axis. As far as I have un

Re: [Valgrind-users] Source of suppressed error

2011-06-25 Thread Nicholas Nethercote
On Wed, Jun 22, 2011 at 9:32 PM, Kartik Kumar wrote: > When I run valgrind with the "-v" option, it spits out the following at the > end: > --12237-- used_suppression:      1 libSystem-keymgr-leak-at-exit > I've tried to google what this libSystem actually is but can't really figure > it out. > Is

Re: [Valgrind-users] leak-check without memory checking

2011-05-31 Thread Nicholas Nethercote
On Fri, May 13, 2011 at 12:18 AM, Frederico Rodrigues Abraham wrote: >   I was wondering if it is possible to run valgrind with > --leak-check=yes or =full without having valgrind check for use of > uninitialized values, memory invasion, memory corruption, etc. It would > be very useful since it m

Re: [Valgrind-users] excluding parameters from demangled C++ function names

2011-05-31 Thread Nicholas Nethercote
On Thu, May 19, 2011 at 2:52 AM, Trevor Spiteri wrote: > Is there a way to omit the parameters from the demangled C++ function > names in valgrind? It would be useful, but I don't know how to do it. Nick -- Simplify dat

Re: [Valgrind-users] Interpretation of profiled Heap Data

2011-05-31 Thread Nicholas Nethercote
On Sat, May 21, 2011 at 12:27 AM, Eric Schwarz wrote: > > Is this a known behaviour for vector<>'s standard allocator to allocate and > hand back like this? > > Does anyone know why this is the case? - Sorry for might posting C++ related > question. A C++ vector implementation might do all sorts

Re: [Valgrind-users] Possible Error: C​allgrind Version 3.6.1 cg_annotat​​e : Line 1 Missing command line

2011-05-31 Thread Nicholas Nethercote
On Mon, May 30, 2011 at 11:04 PM, Josef Weidendorfer wrote: > > this really sounds like a discussion on the color of the bike shed. I want to keep short prefixes. 2 or 3 letters is fine; DRD uses 'drd' in a lot of places. I want to keep "cg" for Cachegrind, so "clg" for Callgrind is fine; "cl

Re: [Valgrind-users] valgrind's synthetic cpu

2011-02-07 Thread Nicholas Nethercote
On Tue, Feb 8, 2011 at 1:10 AM, Wan Mohd Fairuz Wan Ismail wrote: > Since Valgrind use synthetic CPU, can it analyze a cross compiled programs? > eg: an ARM compiled programs tested with Valgrind installed on a x86 > machine. In theory it could, because the intermediate code representation repres

Re: [Valgrind-users] Valgrind on PPC/Darwin

2010-10-10 Thread Nicholas Nethercote
On Fri, Oct 8, 2010 at 1:41 AM, Konstantin Tokarev wrote: > Hello, > I'm interested in getting Valgrind working on PPC/Darwin. I see PPC and > Darwin are already > supported, so I see the last obstacle is "platform-specific code" for this > combination of CPU > and OS. > > What changes should be

Re: [Valgrind-users] Detect Valgrind version number

2010-09-15 Thread Nicholas Nethercote
On Wed, Aug 25, 2010 at 5:34 PM, Oliver Schneider wrote: > > maybe someone can tell me whether my little shell snippet is based on > the right assumptions in order to find the Valgrind version: > > valgrind --version|sed 's/valgrind-//g;s/\([0-9]*\.[0-9]\)\..*/\1/' > > Can one rely on the format o

Re: [Valgrind-users] valgrind does not handle long double

2010-07-08 Thread Nicholas Nethercote
On Wed, Jul 7, 2010 at 4:08 PM, Joerg Bergmann wrote: > > I have a problem with valgrind since I did convert > my program to use long double instead double on > critical points. This is bug 197915: https://bugs.kde.org/show_bug.cgi?id=197915 80-bit FP could be implemented, it's largely a matter

Re: [Valgrind-users] Is --trace-mem option valid?

2010-06-24 Thread Nicholas Nethercote
On Thu, Jun 24, 2010 at 1:05 PM, Juan Carlos Martinez Santos > > I am using the option --trace-mem=yes, but it looks like this is not a > good option. Is the User Manual out of date? There is an alternative > option for that? > > Thanks in advance. > > * > $ valgrind --tool=lackey -

[Valgrind-users] Does anybody use cg_annotate's --threshold option?

2010-06-21 Thread Nicholas Nethercote
Hi, I'm in the middle of reworking Cachegrind's cg_annotate script so that it can be used with a new profile differencing script I've written. cg_annotate currently has a --threshold option which doesn't work well when differencing profiles. I want to change it to something else that is similar b

[Valgrind-users] Valgrind t-shirts available at FreeWear.org

2010-05-05 Thread Nicholas Nethercote
Greetings everybody, If you've ever wanted a Valgrind t-shirt, now is your chance. They are available at freewear.org, more specifically at http://www.freewear.org/?page=show_item&id=FW0031. They've actually been available for over six months, but I've been lax in promoting this fact, and so the

Re: [Valgrind-users] Memcheck and a method to find when uninitialized memory gets copied ...

2010-04-11 Thread Nicholas Nethercote
On Sat, Apr 10, 2010 at 12:52 AM, John Reiser wrote: > > "All the libraries ... copy undefined values around like crazy" > might be an exaggeration.  For instance, I fixed all the instances > in several generations of glibc.  It was a slog at times, but not > totally impossible.  http://BitWagon.c

Re: [Valgrind-users] Announce: Massif-Visualizer - feedback welcome!

2010-04-08 Thread Nicholas Nethercote
On Fri, Apr 2, 2010 at 3:28 PM, Milian Wolff wrote: > Hey List! > > I wrote a GUI for visualizing Massif log data This is cool. I haven't tried it yet, but Massif really needs a good GUI. People get scared off by the text output, I think, and so fail to realize that it does exactly what they wa

Re: [Valgrind-users] Memcheck and a method to find when uninitialized memory gets copied ...

2010-04-08 Thread Nicholas Nethercote
On Thu, Apr 8, 2010 at 9:36 AM, Oliver Schneider wrote: > > If I would develop a patch that allows to give a command line switch > that causes Valgrind to report copying immediately, would that be > something that would be considered for the mainstream version? Or is it > not even worth sending?

Re: [Valgrind-users] Quick questions about the usage of VG_(HT_construct) and VG_(malloc)

2010-04-08 Thread Nicholas Nethercote
On Thu, Apr 8, 2010 at 8:25 AM, Dannie Stanley wrote: > > 1) The VG_(HT_construct) requires a parmeter of HChar*, what is the > purpose of this value? Is it like a unique key? If I need to > dynamically create hashtables what is a good way to assign this value? > I assume that they can't all have

Re: [Valgrind-users] License of the Valgrind User Manual?

2010-01-28 Thread Nicholas Nethercote
On Thu, Jan 28, 2010 at 8:51 AM, Aleksander wrote: > Hi all, > > Is there any specific license for the Valgrind User Manual? GFDL? GFDL 1.2 or later: http://valgrind.org/docs/manual/index.html Nick -- The Planet: dedic

Re: [Valgrind-users] valgrind installed on busybox

2010-01-20 Thread Nicholas Nethercote
On Wed, Jan 13, 2010 at 7:47 PM, Tom Hughes wrote: >> AFAIK, "valgrind" is only a thin wrapper whose job it is to effectively >> or exactly LD_PRELOAD a library which intercepts relevant symbols.  My >> guess is that, for whatever reason, your install is lacking the shared >> object which is suppo

Re: [Valgrind-users] exp-bbv module clarification

2009-12-13 Thread Nicholas Nethercote
Vince, any ideas? Nick On Sun, Nov 29, 2009 at 10:42 AM, Valentin Pistol wrote: > Hi, > > I am trying to use the bbv tool in Valgrind to look at block level > similarity between threads. > I am testing this with Valgrind 3.6.0 SVN together with Apache 2.2.14 with > mpm_worker thread model. > >

Re: [Valgrind-users] access guest instruction in tool instrumentation code

2009-11-04 Thread Nicholas Nethercote
On Wed, Nov 4, 2009 at 5:18 PM, tejas wrote: > Hi, > > I am writing a tool to extract dynamic trace from a program run using > valgrind. I am using a modified version of lackey to accomplish this. I > understand that valgrind prints out the assembly or x86(in this case) > instructions of the progr

Re: [Valgrind-users] How to run Valgrind/Helgrind on 32bit apps, in 64bit OS

2009-09-23 Thread Nicholas Nethercote
On Wed, Sep 23, 2009 at 9:46 PM, Banibrata Dutta wrote: > > I have a x86_64 arch system, running RHEL4.6 x86_64. However, the application > I would like to use Valgrind on, is a 32-bit application (due to some legacy > library dependencies, which are available 32-bit only). > > Should I be using t

Re: [Valgrind-users] Valgrind on Snow Leopard

2009-09-10 Thread Nicholas Nethercote
On Thu, Sep 10, 2009 at 9:25 PM, Luc Bourhis wrote: > Hello there, > > is my understanding correct that the effort stands idle until Apple releases > the sources of Snow Leopard kernel? I believe so, see https://bugs.kde.org/show_bug.cgi?id=205241. > Or is there any hack which could be done > no

Re: [Valgrind-users] Fw: Massif for LWP

2009-09-10 Thread Nicholas Nethercote
On Thu, Sep 10, 2009 at 11:34 PM, Cristian Todor wrote: >> I've been searching around for a tool that cou;d help me >> detect a possible memory leak in the piece of software I'm >> working on. >> I stumbled upon valgrind's massif, but could not figure out >> how to get heap stats on a per-thread b

Re: [Valgrind-users] valgrind hanging -- how to debug valgrind?

2009-09-05 Thread Nicholas Nethercote
On Sat, Sep 5, 2009 at 10:17 AM, Dan Kegel wrote: > So, how easy is it to debug valgrind? README_DEVELOPERS has much of the accumulated wisdom on the topic. I personally end up using diagnostic printfs more than gdb, but YMMV. N --

Re: [Valgrind-users] Uniformity of inter-snapshot times in Massif

2009-09-01 Thread Nicholas Nethercote
On Wed, Sep 2, 2009 at 3:20 AM, Belmon, Stephane wrote: > When Massif culls "old" snapshots, it drops about half of them, and then > resets its period to the MIN() of the inter-snapshots times. > > For long runs, that has somewhat unexpected consequences. You can easily end > up with 75 snapshots

Re: [Valgrind-users] Warnings running 3.5.0 on a Cell BE processor

2009-08-31 Thread Nicholas Nethercote
On Tue, Sep 1, 2009 at 4:30 PM, Bart Van Assche wrote: > On Mon, Aug 31, 2009 at 7:26 PM, Phil Sanders wrote: >> I just tried the 3.5.0 version of valgrind on Cell BE and was seeing a >> number of these errors >> >>      --21076-- WARNING: Serious error when reading debug info >>      --21076-- Whe

Re: [Valgrind-users] overhead on shadow memory translation

2009-08-26 Thread Nicholas Nethercote
On Thu, Aug 27, 2009 at 5:30 AM, Zhao Qin wrote: > > I would like to evaluate translation overhead from application memory to > shadow memory only. In another word, no overhead for checking and > propagation. > Is there any simple way to do it, e.g. an switch to turn on and off for it? Nothing qui

Re: [Valgrind-users] Runtime memorycheck

2009-08-24 Thread Nicholas Nethercote
On Tue, Aug 25, 2009 at 8:17 AM, Markus Moeller wrote: > > I have an application which when using >  valgrind --log-file=prog.val --leak-check=full --show-reachable=yes -v > ./prog shows no memory leak, but when I look at ps or top I see a big memory > usage, but I don't know which part of the prog

Re: [Valgrind-users] Patch for "vex x86->IR: unhandled instruction bytes: 0xF 0xE 0x89 0xE6"

2009-08-20 Thread Nicholas Nethercote
On Thu, Aug 20, 2009 at 8:35 PM, Sven Buijssen wrote: > > Revision 1604 patched VEX/priv/guest_amd64_toIR.c (so it fixed the problem > when > using 64bit Goto BLAS), but not VEX/priv/guest_x86_toIR.c. Ah, thanks for the clarification. Can you please file a bug report so this doesn't get lost? (h

Re: [Valgrind-users] Patch for "vex x86->IR: unhandled instruction bytes: 0xF 0xE 0x89 0xE6"

2009-08-20 Thread Nicholas Nethercote
On Thu, Aug 20, 2009 at 7:25 PM, Sven Buijssen wrote: > > I'd like to provide a patch for VEX/priv/guest_x86_toIR.c such that running > user > code that uses a 32-bit Goto BLAS library through memcheck (from the valgrind > 3.5.0 release or earlier releases) does not issue a > >> vex x86->IR: unhan

Re: [Valgrind-users] Call for papers: WBIA 2009

2009-08-19 Thread Nicholas Nethercote
On Tue, Aug 11, 2009 at 10:58 AM, Nicholas Nethercote wrote: > > WORKSHOP ON BINARY INSTRUMENTATION SYSTEMS AND ANALYSIS > > [...] > > --- > IMPORTANT DATES > --- > 10/16 abstracts due > > [...] > >

Re: [Valgrind-users] Make Lackey Faster

2009-08-17 Thread Nicholas Nethercote
On Tue, Aug 18, 2009 at 9:07 AM, Peng Du wrote: > > Thanks for the hints. The penalty is expected. I've played with PIN and > its pinatrace and MemTrace tools for a while. They worked and the > performance is not too bad, though a bit slower than Valgrind. That's interesting. The conventional wis

Re: [Valgrind-users] Make Lackey Faster

2009-08-17 Thread Nicholas Nethercote
On Tue, Aug 18, 2009 at 7:18 AM, Peng Du wrote: > Hello, everyone > > A newbie question, according to Valgrind's manual for the lackey tool: > > "It (lackey) could be made to run a lot faster by doing a slightly more > sophisticated job of the instrumentation ..." > > Now I need a very simple memor

Re: [Valgrind-users] Strange Ir and Dw numbers from cachegrind

2009-08-14 Thread Nicholas Nethercote
On Fri, Aug 14, 2009 at 7:31 PM, Paul Yuan wrote: > Hi all, > > I used cachegrind to evaluate the cache behavior. But the Dw number is > very strange. I suspect the assembly code doesn't look like you think it does -- that it is doing more memory writes than you think, particularly for the malloc(

Re: [Valgrind-users] VG_(pread) and Bad ELF magic number

2009-08-13 Thread Nicholas Nethercote
On Thu, Aug 13, 2009 at 11:54 PM, Bram De Wachter wrote: > > Tried it first thing this morning. Without success. Still same garbish at > the second (now pread64) syscall. > But even if it worked, this would still not fix any future calls to lseek() > ? > Anyway, something else is not right. Can yo

Re: [Valgrind-users] Boost math function returns NaN only in valgrind

2009-08-13 Thread Nicholas Nethercote
On Thu, Aug 13, 2009 at 7:35 PM, Tom Vercauteren wrote: > > The thing is that the boost function internally uses long doubles. The > problem is that the following is zero within valgrind > >  std::numeric_limits::min() Could you add your example to https://bugs.kde.org/show_bug.cgi?id=197915 ? If

Re: [Valgrind-users] VG_(pread) and Bad ELF magic number

2009-08-12 Thread Nicholas Nethercote
On Wed, Aug 12, 2009 at 11:22 PM, Bram De Wachter wrote: > > It all seems to boil down to VG_(pread) (or more specifically VG_(lseek)) > not working correctly on my system. Here is the relevant portion of strace: Here is the code for VG_(pread). The comment at the top seems very relevant: /* DDD

Re: [Valgrind-users] "assert" on memory exception?

2009-08-11 Thread Nicholas Nethercote
On Wed, Aug 12, 2009 at 3:05 AM, tom fogal wrote: > >> So with the invalid read, it is trying to read an address that is not >> valid.  Would you happen to know what the line "16 bytes inside a >> block 24 free'd" means? > > I think it's telling you where the chunk of memory became invalid.  I'd >

[Valgrind-users] Call for papers: WBIA 2009

2009-08-10 Thread Nicholas Nethercote
, University of Maryland Robert Hundt, Google Naveen Kumar, VMware Greg Lueck, Intel Nicholas Nethercote, Mozilla Stelios Sidiroglou, MIT Alex Skaletsky, Intel Mustafa Tikir, SDSC - Organizing Committee: - Robert Cohn, Intel Jeff

Re: [Valgrind-users] invalid write in middle of big block?

2009-08-05 Thread Nicholas Nethercote
On Thu, Aug 6, 2009 at 1:09 AM, Dan Kegel wrote: > On Wed, Aug 5, 2009 at 7:14 AM, Tom Hughes wrote: >>> (How can you have an invalid address in the middle of a big block?) >> >> It's perfectly possible if you've done VALGRIND_MAKE_MEM_NOACCESS() on that >> piece of memory. Most commonly that would

Re: [Valgrind-users] Mystery error "Assertion failed: (slab->magic == SLAB_MAGIC), function slab_alloc, file x-alloc.c, line 353."

2009-08-04 Thread Nicholas Nethercote
On Wed, Aug 5, 2009 at 10:18 AM, Nicholas > > http://osdir.com/ml/linux.redhat.release.zoot/2002-11/msg00030.html > seems relevant, but I couldn't find it in the Darwin Libc-498.1.7 > sources or xnu-1228.12.14 sources. Ooh, I lie. xnu-1228.12.14 has a function called slab_alloc(), but no constant

Re: [Valgrind-users] Mystery error "Assertion failed: (slab->magic == SLAB_MAGIC), function slab_alloc, file x-alloc.c, line 353."

2009-08-04 Thread Nicholas Nethercote
On Wed, Aug 5, 2009 at 10:04 AM, Dan Kegel wrote: > Twice now (three days ago and today) I got the error > Assertion failed: (slab->magic == SLAB_MAGIC), function slab_alloc, > file x-alloc.c, line 353. > while running the chromium ui tests under valgrind *on Mac OS X*... > and I can't figure out w

Re: [Valgrind-users] symbol resolution in valgrind

2009-07-31 Thread Nicholas Nethercote
On Fri, Jul 31, 2009 at 9:44 PM, Mathieu Lacage wrote: > > What I am really curious about is why the backtrace output by valgrind > does not show the symbolic names of my functions. Would someone mind > point me to the code in valgrind which performs symbol lookups so that > I can figure out what I

Re: [Valgrind-users] Experiences adapting to v's option and log file changes of last two weeks

2009-07-30 Thread Nicholas Nethercote
On Fri, Jul 31, 2009 at 1:54 PM, Dan Kegel wrote: > On Thu, Jul 30, 2009 at 5:19 PM, Julian Seward wrote: >> My intent was that the normal way to use XML mode would >> be   --xml=yes --xml-file=whatever -q  so normally the >> non-XML output would be completely silent, apart from >> critical error m

Re: [Valgrind-users] Experiences adapting to v's option and log file changes of last two weeks

2009-07-30 Thread Nicholas Nethercote
On Fri, Jul 31, 2009 at 9:48 AM, Dan Kegel wrote: > > Option 3 happens to be convenient for me, as long as > the normal residual output is minimal. So the "Command:" line was enough to be annoying, but the empty lines at startup and shutdown don't bother you? > If valgrind is crashing or failing

Re: [Valgrind-users] Experiences adapting to v's option and log file changes of last two weeks

2009-07-30 Thread Nicholas Nethercote
On Fri, Jul 31, 2009 at 3:21 AM, Dan Kegel wrote: > I updated to trunk for the first time in a couple weeks, and started > getting used to the changes. > > I had to switch to --xml-file instead of --log-file; the > only fallout so far is that the command being executed is > printed to stdout (or is

Re: [Valgrind-users] Valgrind and SystemC

2009-07-30 Thread Nicholas Nethercote
On Fri, Jul 31, 2009 at 2:56 AM, Nick Savoiu wrote: > > I'm trying to run valgrind on a SystemC executable but I'm running into some > trouble. > > First, I get lots of errors when running even a simple hello-world > application. My guess is that the stack-switching that SystemC trips Valgrind. >

Re: [Valgrind-users] Code Coverage with Valgrind

2009-07-27 Thread Nicholas Nethercote
On Tue, Jul 28, 2009 at 3:25 PM, He fei wrote: > I've been able to tried out Covergrind, with Valgrind version 3.2.1. There's > a guy asked about this > before: http://www.nabble.com/code-coverage-with-Valgrind-%2B-Covergrind-td15308871.html. > It turned out that though the output of Covergrind is

Re: [Valgrind-users] Code Coverage with Valgrind

2009-07-27 Thread Nicholas Nethercote
On Tue, Jul 28, 2009 at 6:53 AM, He fei wrote: > Hi Josef, > Thanks for your input~ > So you mean there doesn't actually exist a real code coverage tool within > Valgrind that can act like gconv? > Then what about execute valgrind with the target program and then gconv it > (with gconv option turne

Re: [Valgrind-users] Valgrind segfault when using VALGRIND_NON_SIMD_CALL0()

2009-07-27 Thread Nicholas Nethercote
On Mon, Jul 27, 2009 at 11:44 PM, Madhan Sadasivam wrote: > When is this release expected. > This solves a long standing problem for me. Mid-August, hopefully. Nick -- Let Crystal Reports handle the reporting - Free Crys

Re: [Valgrind-users] [Valgrind-developers] bug 100628

2009-07-26 Thread Nicholas Nethercote
On Sat, Jul 25, 2009 at 11:37 PM, John Reiser wrote: > >> I have a patch that tolerates overlaps such as these, where a custom >> block falls entirely within a malloc()'d block.  But there's a design >> choice to be made.  In such a case, what do we do with the malloc()'d >> block? >> >> (1) Ignore

[Valgrind-users] bug 100628

2009-07-24 Thread Nicholas Nethercote
Hi, https://bugs.kde.org/show_bug.cgi?id=100628 concerns a program like this: #include #include "valgrind.h" int main(void) { char* x; x = malloc(1000); VALGRIND_MALLOCLIKE_BLOCK(x, /*szB*/ 16, /*rzB*/0, /*is_zeroed*/0); VALGRIND_MALLOCLIKE_BLOCK(x+100, /*szB*/ 32, /*rzB*/0, /*

Re: [Valgrind-users] Errors with gcc -static

2009-07-24 Thread Nicholas Nethercote
On Mon, Jul 20, 2009 at 2:13 PM, John Reiser wrote: >> Is this info specific to Linux/glibc?  AFAICT sbrk/brk >> isn't even POSIX, which makes it even harder to determine what it >> should do. > > sbrk and brk are not POSIX.  However, any system that is a derivative > of *nix has sbrk and brk becau

Re: [Valgrind-users] Lost and confused with bad alloc?

2009-07-21 Thread Nicholas Nethercote
On Wed, Jul 22, 2009 at 9:51 AM, Susan Margulies wrote: > Hello, everyone! I am a bit mystified by a memory leak that valgrind is > reporting (I am easily mystified), and I thought I would quickly post to see > if anyone could help. > > Valgrind reports: > > ==3471== Address 0x5803F74 is 0 bytes a

Re: [Valgrind-users] Introducing Covergrind Beta 1 - a source code coverage tool

2009-07-20 Thread Nicholas Nethercote
On Mon, Jul 20, 2009 at 5:23 PM, Christophe-Marie Duquesne wrote: > Reading my previous message again, I realize it may be good to give > more information about what I'm looking for. > > Apparently, you can use valgrind to measure code-coverage (with the > covergrind patch). I find this interesting

Re: [Valgrind-users] Errors with gcc -static

2009-07-19 Thread Nicholas Nethercote
On Sat, Jul 18, 2009 at 12:55 AM, John Reiser wrote: > Nicholas Nethercote wrote: > > 0)  sbrk() can *decrease* process address space.  No zero fill is done >    for a decrease, not even the fragment on the high end of the last page >    that is beyond the new highest address.  For

Re: [Valgrind-users] Errors with gcc -static

2009-07-16 Thread Nicholas Nethercote
On Fri, Jul 17, 2009 at 2:16 AM, Zachary Turner wrote: > --track-origins=yes I find that the memory it's claiming is > uninitialized comes from sbrk().  As far as I can tell (please correct > me if I'm wrong) this function is guaranteed to return 0-filled > memory I'm not at all certain this is th

Re: [Valgrind-users] Another missing source/lines question

2009-07-14 Thread Nicholas Nethercote
On Wed, Jul 15, 2009 at 7:51 AM, Andy Grove wrote: > I saw earlier posts today where a user is not seeing source information in > the valgrind output. I'm experiencing the same problem on one machine but > not on another (with the same binary version of my library that I am > testing). http://www.

Re: [Valgrind-users] malloc error althpugh I am NOT allocating

2009-07-13 Thread Nicholas Nethercote
On Mon, Jul 13, 2009 at 8:27 PM, simone marras wrote: > ==18862== > ==18862== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) > ==18862== malloc/free: in use at exit: 4,436 bytes in 9 blocks. > ==18862== malloc/free: 9 allocs, 0 frees, 4,436 bytes allocated. > ==18862== For counts of

Re: [Valgrind-users] Valgrind on MacOS

2009-07-12 Thread Nicholas Nethercote
On Mon, Jul 13, 2009 at 8:33 AM, Simon Gornall wrote: > >        1) There's a piece of code not under my control that has a memory- > access issue >        2) Valgrind kills my program whenever there's a memory-access issue > > What I'd like valgrind to do (in this case) is run my program, report >

Re: [Valgrind-users] Leak warnings as errors?

2009-07-06 Thread Nicholas Nethercote
On Tue, Jul 7, 2009 at 4:57 AM, Mark Leone wrote: > Is there a way to persuade Memcheck to treat leak warnings as errors, > and exit with an error status?  (The "--error-exitcode" option doesn't > seem to do that.) > > Such a feature would be very helpful for automatic regression testing. >  It wou

Re: [Valgrind-users] Massif and overhead

2009-06-29 Thread Nicholas Nethercote
On Mon, Jun 29, 2009 at 8:43 AM, krzys...@leeds.pl wrote: > > One question for the group. Are there some estimate how much slower > application may be when it's run under massif? > I need rough estimation - is it like 5% slower or maybe 100% ? It depends on the program and the options given to Mas

Re: [Valgrind-users] ud2a and Xen

2009-06-28 Thread Nicholas Nethercote
On Fri, Jun 5, 2009 at 7:47 PM, Tim Post wrote: > Hi, > > On Fri, 2009-06-05 at 11:08 +0530, Madhan Sadasivam wrote: >> Hello, >> >> The code below helps to find if we are running on Xen VM and uses >> "ud2a" >> http://xen-3.1.sourcearchive.com/documentation/3.1.0/xen-detect_8c-source.html >> >> an

Re: [Valgrind-users] the 'impossible' happened: signal was supposed to be fatal

2009-06-28 Thread Nicholas Nethercote
2009/6/19 Shachar Shemesh : > > I am the maintainer and developer of an open source tool called fakeroot-ng. > I saw in the archives not long ago that someone asked about fakeroot-net. > fakeroot uses LD_PRELOAD to wrap the system calls, while fakeroot-ng uses > ptrace. Otherwise, the tools have pr

Re: [Valgrind-users] C++ function wrapping and other questions

2009-06-23 Thread Nicholas Nethercote
On Wed, Jun 24, 2009 at 2:49 PM, Venky Venkatesh (venky) wrote: > > [VV]: the original functions that I want to wrap (and call from the > wrapper via an if-then-else) do not have the standard set of supported > signatures (I mean the CALL_FN_*_*). With this limitation, I cannot call > the original

Re: [Valgrind-users] C++ function wrapping and other questions

2009-06-23 Thread Nicholas Nethercote
On Wed, Jun 24, 2009 at 12:47 PM, Venky Venkatesh (venky) wrote: > Nick, > Thanks for the prompt response. > I would very much like your input on one of the other question in my > original mail (reproduced below) -- I am looking for *any* strategies to > solve the problem at hand using valgrind: >

Re: [Valgrind-users] C++ function wrapping and other questions

2009-06-22 Thread Nicholas Nethercote
On Tue, Jun 23, 2009 at 12:57 PM, Venky wrote: > i am new to valgrind and was planning to use valgrind function wrapping for > testing my system (particularly to hit the error and rare cases in the system > which are hard to occur). here are a couple of questions: > #1. all examples i saw in the do

Re: [Valgrind-users] Valgrind segfaults on Kubuntu 9.04

2009-06-10 Thread Nicholas Nethercote
On Thu, Jun 11, 2009 at 7:25 AM, Petar Tsankov wrote: > The problem is fixed. I'm developing a new tool using valgrind's framework and > I copied all files to my laptop, recompiled and I was getting the > segmentation fault error. But after refetching valgrind from the svn > repository everything w

Re: [Valgrind-users] cachegrind on Darwin

2009-06-09 Thread Nicholas Nethercote
On Wed, Jun 10, 2009 at 12:06 PM, Nicholas Nethercote wrote: > On Wed, Jun 10, 2009 at 10:54 AM, Nicholas > Nethercote wrote: >> >> I was just looking at this.  It's a tricky case, lstat64_extended() >> has 4 arguments.  The first two are the same as lstat(), and are e

Re: [Valgrind-users] Valgrind segfaults on Kubuntu 9.04

2009-06-09 Thread Nicholas Nethercote
On Wed, Jun 10, 2009 at 10:42 AM, Petar Tsankov wrote: > > I recently started using Valgrind to do some dynamic analysis. I'm using > version 3.5.0 on my desktop, Presumably you mean the SVN trunk version, which describes itself as "valgrind-3.5.0.SVN"? > which is running Kubuntu 8.04, and valgri

Re: [Valgrind-users] cachegrind on Darwin

2009-06-09 Thread Nicholas Nethercote
On Wed, Jun 10, 2009 at 10:54 AM, Nicholas Nethercote wrote: > > I was just looking at this.  It's a tricky case, lstat64_extended() > has 4 arguments.  The first two are the same as lstat(), and are easy. >  But the last two are pointers, xsecurity and xsecurity_size, and I&#

Re: [Valgrind-users] cachegrind on Darwin

2009-06-09 Thread Nicholas Nethercote
On Fri, May 29, 2009 at 8:43 PM, Luc Bourhis wrote: > > --36548-- WARNING: unhandled syscall: 33554774 > --36548--            a.k.a.: 342 > > That is to say: > > /usr/include/sys/syscall.h:#define      SYS_lstat64_extended 342 > > I read through README_MISSING_SYSCALL_OR_IOCTL and I could probably

Re: [Valgrind-users] Make gives Error

2009-06-09 Thread Nicholas Nethercote
On Tue, Jun 9, 2009 at 5:47 PM, Shamith Mukundan wrote: > OS: MacOSX 10.5.6 > > While given a make, the following error happen... > > > gcc  -arch i386 -O2 -g -Wmissing-prototypes -Wall -Wshadow -Wpointer-arith > -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length > -fno-strict-alias

Re: [Valgrind-users] configure: error: build/install requires that 'sed' is GNU sed

2009-06-09 Thread Nicholas Nethercote
2009/6/9 Edward King : > My OS is Solaris 10,I install valgrind-3.4.1,like follows: > $./configure > > checking for gdb... /no/gdb/was/found/at/configure/time > ehecking for GNU sed... sed:illegal option --version > note: GNU sed is only required at build/install time > configure: error: build

Re: [Valgrind-users] Adding unhandled ioctls for Xen

2009-06-06 Thread Nicholas Nethercote
On Sat, Jun 6, 2009 at 6:38 PM, Tim Post wrote: >> > 2 - I should VKI namespaceize the few constants and structures needed >> > and add them in include/vki/vki-{arch}.h? I noted the presence of >> > _VKI_IOC() in both x86 and amd64. Since these aren't coming out of >> > linux, would it be appropria

Re: [Valgrind-users] Adding unhandled ioctls for Xen

2009-06-06 Thread Nicholas Nethercote
On Sat, Jun 6, 2009 at 4:33 PM, Tim Post wrote: > > Sorry if this is the wrong list to post this question. The valgrind-developers list is arguably more suitable, but this is fine. > 1 - Is syswrap-generic.c (in PRE(sys_ioctl) and POST(sys_ioctl) > respectively) the right place for these? That's

Re: [Valgrind-users] Unable to suppress "still reachable"

2009-06-03 Thread Nicholas Nethercote
On Thu, Jun 4, 2009 at 1:27 AM, Tom Hughes wrote: > Daniel Blezek wrote: > >> Perhaps someone can give me some help... >> >> I’d like to suppress a “still reachable” warning, but perhaps I don’t >> understand Valgrind’s behavior. > > I don't think you can - it's not really a warning, it's more of

Re: [Valgrind-users] How can I instrument the running program?

2009-06-01 Thread Nicholas Nethercote
On Mon, Jun 1, 2009 at 6:59 PM, Sitos Lin wrote: > Dear all: >  The valgrind tool can instrument the program at the beginning of > execution by the command: valgrind However, how can I instrument > the running program? Because I want to skip the initialization phase > of the program and only

Re: [Valgrind-users] An error when I use cachegrind to profile SPECjbb

2009-06-01 Thread Nicholas Nethercote
On Tue, Jun 2, 2009 at 4:34 AM, Sitos Lin wrote: > Dear all: >  I am using valgrind-3.3.1. When I use the tool cachegrind to profile > SPECjbb with sun's java virtual machine, I get the following error: Try this: http://www.valgrind.org/docs/manual/faq.html#faq.java Nick

Re: [Valgrind-users] cachegrind on Darwin

2009-05-28 Thread Nicholas Nethercote
On Thu, May 28, 2009 at 6:03 PM, Luc Bourhis wrote: > Hello there, > > I know it is not implemented yet but I would like to know about the roadmap. Actually, it is :) Check out the SVN trunk: http://www.valgrind.org/downloads/repository.html Nick --

Re: [Valgrind-users] cachegrind annotation of inline functions

2009-05-28 Thread Nicholas Nethercote
On Fri, May 29, 2009 at 7:16 AM, Brian J. Miller wrote: > > I'm using 3.4.1 and am wondering if the location of the > annotation indicates whether the compiler actually inlined > a function declared inline.  I have some inline functions > whose annotated cache data appears in the .hh file while >

Re: [Valgrind-users] False Sharing Detection

2009-05-27 Thread Nicholas Nethercote
On Thu, May 28, 2009 at 9:12 AM, Ivan Novick wrote: > Hi, > I would like to detect cases of false sharing in my program. > By this I mean cases where multiple threads are both trying to write data to > different memory locations but those locations are closest enough in memory > that they are on t

Re: [Valgrind-users] valgrind macos

2009-05-19 Thread Nicholas Nethercote
On Wed, May 20, 2009 at 12:07 AM, Dan Kegel wrote: > On Tue, May 19, 2009 at 6:29 AM, Bruno Causse wrote: >> when i use valgrind, >> valgrind ./Roxane -h 24 -t 8 ../../fforum-20-39.src >> valgring says "cannot execute binary file" >> >>   file Roxane >> >> Mach-O 64 bit executable X86-64 >> >>   

Re: [Valgrind-users] Valgrind malloc problem

2009-05-15 Thread Nicholas Nethercote
On Fri, May 15, 2009 at 6:55 AM, wrote: > >  I am using valgrind 3.4.1 to try to find a memory leak. My > program has an initial routine which allocates a lot of memory - > around 1 GB. When I run the program by itself it runs fine, however > when I run it under valgrind, one of the many malloc c

Re: [Valgrind-users] install question: how to build for multiple architectures?

2009-05-14 Thread Nicholas Nethercote
On Fri, May 15, 2009 at 4:44 AM, Ashley Pittman wrote: > > Unless it's been fixed in the last month the VPATH stuff is broken on > the HEAD, I posted a patch to make the basic build work last month but > there are remaining problems, the tests don't work for example. Which is something of a shows

Re: [Valgrind-users] No "Use of uninitialised value" warning

2009-05-12 Thread Nicholas Nethercote
On Wed, May 13, 2009 at 2:43 AM, Colin Miller wrote: > André Wöbbeking wrote: > > Valgrind only reports when an unused variable is used for flow-control > (or, hopefuly I/O). > > Swapping doesn't trigger the alert. This is because, in C, structures > can legitimately have > uninitialised areas due

Re: [Valgrind-users] Memcheck and lost pointer tracking

2009-05-07 Thread Nicholas Nethercote
On Fri, May 8, 2009 at 3:06 PM, Theodoros V. Kalamatianos wrote: >> >> In general, what you are proposing is possible, but it's not easy, is >> really slow and would be lots of extra code in Memcheck. > > What if it was done in two passes? Run memcheck normally, and then re-run > valgrind repeated

Re: [Valgrind-users] Memcheck and lost pointer tracking

2009-05-07 Thread Nicholas Nethercote
On Fri, May 8, 2009 at 12:49 AM, John Reiser wrote: >> - The last place where a pointer to a block was clobbered/lost, which is a >> probable location for the actual leak > > Search the Web for "valgrind omega". This paper is related too: author = {Jonas Maebe and Michiel Ronsse and Koe

Re: [Valgrind-users] some basic questions with massif

2009-05-05 Thread Nicholas Nethercote
On Tue, May 5, 2009 at 8:10 PM, Roberto Diaz wrote: > Hello everybody. > > I am trying to fully understand massif results.. I have the following code: You are using an older version of Massif. It was changed in recent releases, and the results are easier to understand. I recommend upgrading. N

  1   2   >