diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-09-15 07:24:13 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-09-15 07:24:13 -0700 |
commit | d14f512d7ad71f2cb3bd927f69dfc742514a79a2 (patch) | |
tree | 16cba4cb5d59017161439b3788549ce224e44bc8 /linenoise | |
parent | e48c8fc606ce545fd0b241e55dd4f64624598ac5 (diff) | |
download | txr-d14f512d7ad71f2cb3bd927f69dfc742514a79a2.tar.gz txr-d14f512d7ad71f2cb3bd927f69dfc742514a79a2.tar.bz2 txr-d14f512d7ad71f2cb3bd927f69dfc742514a79a2.zip |
False positive valgrind error: uninitialized sigset_t.
The issue is that sigset_t is 1024 bits wide on Linux, but
there aren't actually that many signals. Valgrind knows this
and so when sigprocmask returns the old signal set, Valgrind
only marks a portion of it as initialized, and not the
entire 1024 bits. When this sigset_t is later passed into
sig_set again, we do a memcmp on all 1024 bits and Valgrind
complains about a use of uninitialized data. Test case:
run valgrind ./txr -i and execute a (throw 'foo) expr.
* signal.c (sig_mask): If we are compiling with Valgrind
support, mark the old signal set defined just before passing
it to sigprocmask, so it has no uninitialized bits.
Diffstat (limited to 'linenoise')
0 files changed, 0 insertions, 0 deletions