This is the mail archive of the
mailing list for the GCC project.
Re: Is test case with 700k lines of code a valid test case?
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- Cc: Paulo Matos <pmatos at linki dot tools>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Fri, 18 Mar 2016 15:08:53 +0100
- Subject: Re: Is test case with 700k lines of code a valid test case?
- Authentication-results: sourceware.org; auth=none
- References: <F3880EB7-70F6-475B-A6E6-363B50DD2AD4 at cs dot uni-saarland dot de> <56EBF87C dot 3040301 at linki dot tools> <CAH6eHdSCLX9FGxfx0VSn=mY5Fqm=yJk7AzKhWYnY2d=xsvhkgA at mail dot gmail dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Mar 18, 2016 at 02:02:48PM +0000, Jonathan Wakely wrote:
> On 18 March 2016 at 12:45, Paulo Matos wrote:
> >> I have a source file with 700k lines of code 99% of which are printf() statements. Compiling this test case crashes GCC 5.3.0 with segmentation fault.
> >> Can such test case be considered valid or source files of size 35 MB are too much for a C compiler and it should crash? It crashes on Ubuntu 14.04 64bit with 16GB of RAM.
> >> Cheers,
> >> Andrey
> > I would think it's useful but a reduced version would be great.
> > Can you reduce the test? If you need a hand, I can help. Contact me
> > directly and I will give it a try.
> It's probably crashing because it's too large, so if you reduce it
> then it won't crash.
But if most of the lines are pretty much the same or similar, it might be
worth trying to recreate it with preprocessor macros. Just pick up a couple
of most common lines and duplicate them as many times as needed to try to
get the testcase into similar size.