Author: Unknown
Subject: Valgrind error
Date: Thursday, 16 Apr 2020, 02:05:18
I receive the following Valgrind error when trying to run ./Nine20 2 2 100 -123 123- ==3154== Command: ./Nine20 2 2 100 -123 123- ==3154== ==3154== Conditional jump or move depends on uninitialised value(s) ==3154== at 0x483BBE9: strlen (vg_replace_strmem.c:461) ==3154== by 0x4017A3: main (Nine20.c:143) For context, these are the relevant lines of code // remove the position P at the head of the queue char *p; remD(&d, &p); searchH(h, p, &reached_from, &n); int p_len = strlen(p); I'm calculating p_len so that I can iterate over the characters of p to find out where '-' is.PREV INDEX NEXT