wmkhoo / taintgrind

A taint-tracking plugin for the Valgrind memory checking tool
GNU General Public License v2.0
249 stars 42 forks source link

assert fail in taintgrind #2

Closed msoos closed 10 years ago

msoos commented 10 years ago

When I run the example:

$ valgrind --tool=taintgrind --file-filter=test.txt --taint-start=0 --taint-len=1 --critical-ins-only=no gzip -c test.txt

I get:

$ valgrind --tool=taintgrind --file-filter=~/test.txt --taint-start=0 --taint-len=1 --critical-ins-only=no gzip -c  ~/test.txt
==12658== Taintgrind, the taint analysis tool
==12658== Copyright (C) 2010, and GNU GPL'd, by Wei Ming Khoo.
==12658== Using Valgrind-3.9.0 and LibVEX; rerun with -h for copyright info
==12658== Command: gzip -c /home/soos/test.txt
==12658== 

Taintgrind: tnt_translate.c:1007 (complainIfTainted): Assertion 'di2' failed.
==12658==    at 0x38037DA2: report_and_quit (m_libcassert.c:260)
==12658==    by 0x38037F62: vgPlain_assert_fail (m_libcassert.c:340)
==12658==    by 0x3802647B: complainIfTainted.isra.21 (tnt_translate.c:1007)
==12658==    by 0x3802FB60: do_shadow_Store (tnt_translate.c:4434)
==12658==    by 0x3803414F: vgTaintgrind_instrument (tnt_translate.c:7657)
==12658==    by 0x3805074D: tool_instrument_then_gdbserver_if_needed (m_translate.c:230)
==12658==    by 0x380E88CB: LibVEX_Translate (main_main.c:743)
==12658==    by 0x38052B13: vgPlain_translate (m_translate.c:1602)
==12658==    by 0x380847E6: vgPlain_scheduler (scheduler.c:1004)
==12658==    by 0x38094C35: run_a_thread_NORETURN (syswrap-linux.c:103)

sched status:
  running_tid=1

Thread 1: status = VgTs_Runnable
==12658==    at 0x4005305: _dl_start (rtld.c:304)
==12658==    by 0x40016B7: ??? (in /lib/x86_64-linux-gnu/ld-2.15.so)
==12658==    by 0x2: ???
==12658==    by 0xFFF000D7A: ???
==12658==    by 0xFFF000D7F: ???
==12658==    by 0xFFF000D82: ???

Note: see also the FAQ in the source distribution.
It contains workarounds to several common problems.
In particular, if Valgrind aborted or crashed after
identifying problems in your program, there's a good chance
that fixing those problems will prevent Valgrind aborting or
crashing, especially if it happened in m_mallocfree.c.

If that doesn't help, please report this bug to: www.valgrind.org

In the bug report, send all the above text, the valgrind
version, and what OS and version you are using.  Thanks.

Version of valgrind used is 3.9.0. I used the GIT version of taintgrind. Everything compiled without any warnings.

PS: Thanks a lot of this tool, would be awesome to use it!

wmkhoo commented 10 years ago

Thanks. Fixed in 41a354832a.

msoos commented 10 years ago

Thanks man, fixed!