|
From: | Reuben Thomas |
Subject: | Re: Problem with valgrind-tests: relies on bash not causing error |
Date: | Sat, 5 Aug 2017 18:05:19 +0100 |
The test for whether to use valgrind runs:/bin/bash -c 'exit 0'This looks pretty harmless; unfortunately, bash itself causes problems:
$ valgrind -q --error-exitcode=1 --leak-check=full /bin/bash -c 'exit 0'
==32197== Invalid free() / delete / delete[] / realloc()
==32197== at 0x4C2ED5B: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==32197== by 0x45E1D0: ??? (in /bin/bash)
==32197== by 0x45E37F: run_unwind_frame (in /bin/bash)
==32197== by 0x47B664: parse_and_execute (in /bin/bash)
==32197== by 0x4209D6: ??? (in /bin/bash)
==32197== by 0x41F893: main (in /bin/bash)
==32197== Address 0x423b828 is in the brk data segment 0x4228000-0x423bfff
==32197==Here I was using the provided Ubuntu 16.04 build of bash:
$ bash --version
GNU bash, version 4.3.46(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2013 Free Software Foundation, Inc.Maybe use some other known-available utility that doesn't play weird tricks with memory? /bin/ls works for me!
valgrind-tests.m4
Description: application/m4
[Prev in Thread] | Current Thread | [Next in Thread] |