zsh-workers
 help / color / mirror / code / Atom feed
From: Julian Seward <jseward@acm.org>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Felix Rosencrantz <f_rosencrantz@yahoo.com>,
	zsh-workers <zsh-workers@sunsite.auc.dk>
Subject: Re: valgrind: useful memory checker
Date: Mon, 22 Apr 2002 23:10:09 +0100	[thread overview]
Message-ID: <3CC48A41.17564396@acm.org> (raw)
In-Reply-To: <Pine.LNX.4.44.0204221128350.24441-100000@ns1.sodaware.com>


> > One of the problems was that zsh calls malloc() during signal handlers.
> > Which Julian pointed out is not a particularly safe thing to do....  (I
> > figure Bart or others might comment about this.)
> 
> It's "not particularly safe" only if you don't know what you're doing.
> 
> We went to some trouble a while ago to assure that signals are blocked
> while zsh is performing other memory allocations, so that we don't have
> re-entry problems with calling malloc() from inside the handlers when they
> do get called.

Yes, it's fairer to say that until recently valgrind had a really nasty
hack to do with delivering signals to processes blocked in system calls,
which apparently zsh does.  So valgrind was somewhat limited in what 
it could do safely in this situation.

Valgrind snapshots >= 20020420 have completely new signal simulation
stuff, and all those limitations have gone away.

> Also, I ran valgrind on zsh interactively for a little bit, did
> some completions and found a couple leaks.  Of course, adding valgrind
> to the automated tests would be quite useful.

Valgrind's -s flag makes it completely silent apart from reporting errors.
This was added specifically to help people who want to add it to automated
regression test systems.  You might find it useful.

J


  reply	other threads:[~2002-04-22 22:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-22 18:20 Felix Rosencrantz
2002-04-22 18:32 ` Bart Schaefer
2002-04-22 22:10   ` Julian Seward [this message]
2002-04-24  7:56 ` Sven Wischnowsky
2002-04-25  5:27   ` Felix Rosencrantz
2002-04-26  6:00     ` Felix Rosencrantz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3CC48A41.17564396@acm.org \
    --to=jseward@acm.org \
    --cc=f_rosencrantz@yahoo.com \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).