On 06/07/2019 03:04, David C. Rankin wrote:
On 07/05/2019 10:34 AM, Matwey V. Kornilov wrote:
By the way. Is anybody going to support evergreen for 42.x?
I would go for that in a heartbeat. Last release with a properly working valgrind set of exclusion files that properly report the number of bytes allocated, e.g.
#include <stdio.h> #include <stdlib.h>
#define NVAL 5
int main (void) {
int *a = malloc (NVAL * sizeof *a); if (!a) { perror ("malloc"); return 1; } for (int i = 0; i < NVAL; i++) { a[i] = NVAL - i; printf (i ? " %d" : "%d", a[i]); } putchar ('\n');
free (a); }
42.3 Correctly Reports:
$ valgrind ./bin/vgtest ==10632== Memcheck, a memory error detector ==10632== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al. ==10632== Using Valgrind-3.12.0 and LibVEX; rerun with -h for copyright info ==10632== Command: ./bin/vgtest ==10632== 5 4 3 2 1 ==10632== ==10632== HEAP SUMMARY: ==10632== in use at exit: 0 bytes in 0 blocks ==10632== total heap usage: 1 allocs, 1 frees, 20 bytes allocated ==10632== ==10632== All heap blocks were freed -- no leaks are possible ==10632== ==10632== For counts of detected and suppressed errors, rerun with: -v ==10632== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Yes Virginia, an allocation of 5 int requires 20 bytes of storage...
Both 15.0 and 15.1 Incorrectly Report:
$ valgrind ./bin/vgtest ==2015== Memcheck, a memory error detector ==2015== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==2015== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info ==2015== Command: ./bin/vgtest ==2015== 5 4 3 2 1 ==2015== ==2015== HEAP SUMMARY: ==2015== in use at exit: 0 bytes in 0 blocks ==2015== total heap usage: 2 allocs, 2 frees, 1,044 bytes allocated ==2015== ==2015== All heap blocks were freed -- no leaks are possible ==2015== ==2015== For counts of detected and suppressed errors, rerun with: -v ==2015== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Students, you can confirm and verify the corresponding allocation by checking with valgrind -- Wait... WTF? valgrind doesn't do that correctly anymore :(
Have you reported a bug yet? thats how the issue will get fixed. -- Simon Lees (Simotek) http://simotek.net Emergency Update Team keybase.io/simotek SUSE Linux Adelaide Australia, UTC+10:30 GPG Fingerprint: 5B87 DB9D 88DC F606 E489 CEC5 0922 C246 02F0 014B -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org