Path: csiph.com!1.us.feeder.erje.net!feeder.erje.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: Thomas Koenig Newsgroups: comp.compilers Subject: Re: random debugging, What should I prepare for a PL PhD program Date: Sat, 22 Oct 2022 08:49:51 -0000 (UTC) Organization: news.netcologne.de Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <22-10-042@comp.compilers> References: <22-10-029@comp.compilers> <22-10-031@comp.compilers> <22-10-035@comp.compilers> <22-10-036@comp.compilers> <22-10-039@comp.compilers> <22-10-040@comp.compilers> Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="57840"; mail-complaints-to="abuse@iecc.com" Keywords: debug, comment Posted-Date: 22 Oct 2022 14:44:30 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:3212 gah4 schrieb: > On Friday, October 21, 2022 at 4:46:28 PM UTC-7, Thomas Koenig wrote: > > (snip) > >> Traditionally, internal compiler errors on invalid code have been >> considered relatively easy. But you may always find a hard one... > > Reminds me of the story (I never saw anyone do it) that in the early days > of compilers, they would feed cards from the card recycle bin to them. > > That is, as you note, a test of (most likely) invalid code. > > But now that we don't have card recycle bins, where do you get a good > selection of invalid code to test them with? There appears to be an art to it. At least one frequent submitter of bug reports to gfortran has mastered, but I don't know how he does it (and haven't asked). An automated code generator which generates valid programs according to the syntax and semantics rules of a langauge and then systematically violates the rules (especially those prescribed outside the formal grammar) one by one might be possible. Alternatively, it might also be feasible to parse an existing code base and systematically insert violations there. I am not sure that research has been one on that, but it would be interesting. [I believe I have seen both random program generators and "fuzzers" that make random changes to programs. This isn't just for compilers, it's for anything that is supposed to interpret its input. -John]