Closed davidgiven closed 3 years ago
Hello @davidgiven,
I am getting the undefined reference to `LLnc_recover' error --- in particular, when I try building ACK on Launchpad (e.g.). Interestingly, this error appears very consistently (not sporadically) when I build on Launchpad.
Hope this information is useful.
Thank you!
Hello @davidgiven,
It seems that some string buffer --- I am not sure which --- was overflowing into the non_corr
variable in some situations. This made non_corr
non-zero when it should be zero. The problem can be highlighted more clearly with this (temporary) patch:
diff --git a/util/LLgen/src/gencode.c b/util/LLgen/src/gencode.c
index 81572de93..be391ee80 100644
--- a/util/LLgen/src/gencode.c
+++ b/util/LLgen/src/gencode.c
@@ -115,6 +115,10 @@ STATIC void genhdr(void)
fputs("#define LLNOFIRSTS\n", fpars);
#ifdef NON_CORRECTING
if (non_corr) fputs("#define LL_NON_CORR 1\n", fpars);
+/***/
+ if (non_corr) fprintf(stderr, "LL_NON_CORR! %#x %#x %#x\n",
+ non_corr, (&non_corr)[1], (&non_corr)[-1]);
+/***/
#endif
fprintf(fpars, "#define LL_LEXI %s\n", lexical);
copyfile(incl_file);
Thank you!
I think this is now fixed!
I (and other people) are seeing sporadic build failures. e.g.:
and
They seem related to llgen. valgrind has found one use of uninitialised data there, which I've fixed, and I'll see if it makes the problems more or less severe.