<div dir="ltr">Hi Andreas,<br><br><div class="gmail_quote"><div dir="ltr">On Thu, 23 Aug 2018 at 08:58 Andreas Tille <<a href="mailto:andreas@fam-tille.de">andreas@fam-tille.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
On Wed, Aug 22, 2018 at 09:42:13PM +0200, Liubov Chuprikova wrote:<br>
> An autopkgtest fails with segfault in testing and unstable [1].<br>
> <br>
> ```<br>
> /usr/bin/../lib/atac/bin/statsGenerator -a /tmp/autopkgtest-lxc.epng5fx9/downtmp/autopkgtest_tmp/results/EcolivsSent.atac<br>
> -p /tmp/autopkgtest-lxc.epng5fx9/downtmp/autopkgtest_tmp/results/stats/EcolivsSent<br>
> -g A > /tmp/autopkgtest-lxc.epng5fx9/downtmp/autopkgtest_tmp/results/stats/EcolivsSent.stats<br>
> <br>
> Segmentation fault<br>
> Failed to ganerate statistics.<br>
> ```<br>
> <br>
> Notably, that building and testing in stable were successful (I tested<br>
> it in clean chroot). JFI, I tried installing an older version of gcc on<br>
> testing, the one that is used in stable (4:6.3.0-4), and this eliminated<br>
> the segfault.<br>
<br>
Thanks for this good catch which proves how important your Outreachy<br>
project is for providing stable and working packages in Debian Med.<br></blockquote><div><br></div><div>Now I see!</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks also for verifying that older compilers seem to produce working<br>
code while newer don't.<br></blockquote><div> </div><div>This seemed just something to go on.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I wonder whether you feel able to do some debugging what position of<br>
code causes the issue. </blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">My first shout would be to grep for<br>
   "Failed to ganerate statistics"<br>
which is probably in a wrapper around some code and than use some<br>
debugging techniques (either you are comfortable with gdb / want to<br>
become comfortable with gdb or simply use some <br>
    printf("DEBUG %s(%i): ...", __FILE__, __LINE__, ...);<br>
statements in the code to watch what's happening.</blockquote><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
It might be helpful to lower / switch off optimisation options to see<br>
whether some optimisation feature of some later gcc will deal<br>
differently with some not properly specified code part.<br></blockquote><div><br></div><div>Thanks a lot for your advise! I tried debugging with grep when I had just caught the error for the first time, but it was without result at that moment. Turning off optimization flags, as you recommended, also did not help. After that I made one more attemp to debug with grep and printing some statements and finally found what it is called classical non-bug in gcc [1].</div><div><br></div><div>I have just uploaded a patch. Could you please sponsor an upload?</div><div><br></div><div>With regards,</div><div>Liubov</div><div><br></div><div>[1] <a href="https://gcc.gnu.org/bugs/#nonbugs_c">https://gcc.gnu.org/bugs/#nonbugs_c</a></div><div><br></div></div></div>