Re:You can use C-Reduce for any language
by adastra22 on Wednesday November 27, 2024 @03:40PM
(#42259526)
It runs the executed code in order to determine if the bug exists, does it not?
[ Parent
| on HN ]
Re:You can use C-Reduce for any language
by Cieric on Wednesday November 27, 2024 @03:54PM
(#42259658)
That depends completely on the interesting-ness test that's provided. If you're looking for a compiler bug (like I do often for my language), then the interesting-ness test checks the compile logs for information like the "Segmentation Fault" text, no need to run the actual executable. You could also hoist everything into docker if you really want to, or ship it off to another device to run.
Re:You can use C-Reduce for any language
by furyofantares on Thursday December 05, 2024 @12:48AM
(#42325340)
If your compiler bug is "the compiler crashes when compiling this code" then you just need to try to compile it. Or if it's "it takes 15 minutes to compile this file" then you just need to check if it compiles in a reasonable/expected amount of time.
If the bug is "the compiler generates an if/else where neither branch is hit", then you would need to execute the code. However, you would likely be able to directly reduce such a bug yourself. When the compiler is generating bad code you can usually just reduce it to that section of code directly. It seems like C-Reduce must be for compiler bugs where it's not generating any code at all (crashing) or the issue isn't with the code generation (extremely slow compiles).