ref: 4216f0a9b0bd08d66ecb50e453d22a5d8c23da6b
parent: e3fde986ad8665000c0cfcb817c9034334cfdc93
author: ISSOtm <eldredhabert0@gmail.com>
date: Thu Mar 25 07:26:58 EDT 2021
Init top-level fstack node line number It still gets written to the object file, generating Valgrind warnings about using uninitialized memory. To silence those errors, and make output more reproducible, init the line no to a dummy (0) value.
--- a/src/asm/fstack.c
+++ b/src/asm/fstack.c
@@ -539,6 +539,7 @@
context->fileInfo = (struct FileStackNode *)fileInfo;
/* lineNo and reptIter are unused on the top-level context */
context->fileInfo->parent = NULL;
+ context->fileInfo->lineNo = 0; // This still gets written to the object file, so init it
context->fileInfo->referenced = false;
context->fileInfo->type = NODE_FILE;
memcpy(fileInfo->name, fileName, len + 1);