https://bugs.kde.org/show_bug.cgi?id=432801

--- Comment #6 from Eyal <eyals...@gmail.com> ---
Here's one that also fails but with a different error:

==12859== Syscall param exit_group(status) contains uninitialised byte(s)
==12859==    at 0x492F9D6: _Exit (_exit.c:31)
==12859==    by 0x48A2E89: __run_exit_handlers (exit.c:132)
==12859==    by 0x48A2EB9: exit (exit.c:139)
==12859==    by 0x488D0A1: (below main) (libc-start.c:342)
==12859==  Uninitialised value was created by a stack allocation
==12859==    at 0x401030: ??? (in /tmp/a.out)

// clang -W -Wall -g -O2 Standalone.c && valgrind --track-origins=yes ./a.out

#include <signal.h>
#include <string.h>

int main()
{
    {
        struct sigaction act;
        if (sigaction(SIGTERM, 0, &act) < 0) {
          return 1;
        }
        if (sigaction(SIGTERM, 0, &act) < 0) {
          return 1;
        }
    }

    char pattern[] = "123456786";
    pattern[2] = '4';
    const unsigned long plen = strlen(pattern);
    size_t hp=0;
    for (size_t i = 1; i < plen; ++i)
        hp += pattern[i];
    if (hp)
      return 1;

    return 0;
}

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to