Re: binary search debugging of compilers

mrs@kithrup.com (Mike Stump)
Sat, 20 May 2023 18:04:39 GMT

          From comp.compilers

Related articles
[16 earlier articles]
Re: binary search debugging of compilers rsc@swtch.com (Russ Cox) (2023-05-18)
Re: binary search debugging of compilers 864-117-4973@kylheku.com (Kaz Kylheku) (2023-05-19)
Re: binary search debugging of compilers 864-117-4973@kylheku.com (Kaz Kylheku) (2023-05-19)
binary search debugging of compilers cclick0@gmail.com (Cliff Click) (2023-05-19)
binary search debugging of compilers tekk.nolagi@gmail.com (Max B) (2023-05-19)
Re: binary search debugging of compilers tkoenig@netcologne.de (Thomas Koenig) (2023-05-19)
Re: binary search debugging of compilers mrs@kithrup.com (2023-05-20)
Re: binary search debugging of compilers gah4@u.washington.edu (gah4) (2023-05-20)
| List of all articles for this month |

From: mrs@kithrup.com (Mike Stump)
Newsgroups: comp.compilers
Date: Sat, 20 May 2023 18:04:39 GMT
Organization: Kithrup Enterprises, Ltd.
References: 23-05-013
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="970"; mail-complaints-to="abuse@iecc.com"
Keywords: debug, tools
Posted-Date: 20 May 2023 18:03:53 EDT

>From: Larry McVoy <lm@mcvoy.com>
>Date: Mon, May 15, 2023 at 1:57 PM
>Subject: Re: history of source control binary search for debugging
>
>Good to hear from you Russ.
>
>I'm pretty sure I "invented" that idea, which means I hadn't seen it before.
>All I was doing was using the fact that binary search is log(n). And giving
>non-kernel people a way to do some grunt work and then get it close and
>then hand that off to the kernel people.
>
>But note that the BUG-HUNTING was using snapshot, not source management.
>BitKeeper hadn't been invented yet and the other source management systems
>sucked because they were reproducible only at tagged points. At least
>that was true of CVS.


With cvs update -D, one can select a date and update the tree to that
specific date. Indeed, I've been known to use '1 day ago', ... '50
days ago' and binary search that way as well. Nice interface as you
only have to deal with changing a single number. And the granularity
in days is a nice metric. It gets you down to a day or two and then
you dig in from there. Further, with cvs, you could update only parts
of the tree if you suspect which part might be failing. Front end,
loop unrolling and so on.


Another technique I've used to is save off part of the compiler
(cc1/cc1plus) binary from the nightly build system, and then when you
want state on a bug, you simply for i in */cc1; do test $i; done and
then you get a total view of that code against all the compilers. You
can see bugs pop in and out, or if they are simple, always worked
before, and never after.


These methods are so basic that there is no need to write them down.
I've been using such techniques longer than linux has been around.
:-)


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.