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: Ewart TimothÃe <timothee dot ewart at epfl dot ch>
- To: "Paul_Koning at Dell dot com" <Paul_Koning at Dell dot com>
- Cc: "tarasevich at cs dot uni-saarland dot de" <tarasevich at cs dot uni-saarland dot de>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Mon, 14 Mar 2016 15:52:31 +0000
- 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> <ACF5E146-E205-44CC-8055-5214127C9994 at dell dot com>
99% of 700k, 693k of printf(), is it ascii art ?
> Le 14 Mar 2016 Ã 16:42, Paul_Koning@Dell.com a Ãcrit :
>> On Mar 14, 2016, at 11:31 AM, Andrey Tarasevich <firstname.lastname@example.org> 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.
> I have a rather simple view of this sort of thing. If I feed input to a program and the program crashes, that's always a bug. This is true even if the input was "invalid" in some way.
> That said, 700k lines in a single source file is a bit extravagant, but I see no way that such a thing could be legitimately called "invalid". If it's all one function (or worse yet, one basic block), I would not be at all surprised if it exceeds a resource limit on how big a function can be, but if so, the expected output would be an error message, not a crash.