News for hackers. Stuff that matters.
Re:Timeline of the xz open source attack by jononor on Friday April 05, 2024 @04:47AM (#39940111)
It could be required to declare which error should happen, and at what line it should trigger. And the C program should still be syntactically valid and pass linting. One could create a tool which would have a folder of .c files to check with such declarations. And output similar things to as the configure script.

Configure scrips tend to be a very slow part of projects, so a new tool that would support parallel compile/run of these checks would also have a considerable speedup. In addition to being more reviewable, verifiable and less error prone.

Re:Timeline of the xz open source attack by fl7305 on Friday April 05, 2024 @04:52PM (#39947071)
All good things if you want to use the autotools. And other tools too.

I've been porting and compiling Unix programs since 5 years before Linux. There was a lot of work needed to port between Unix variants, or even worse, non-Unix variants. So I can see the problem that the autotools solve.

But I never spent much time learning the details on how the autotools work. When './configure' has some problem, it is a very steep uphill battle to get any traction on the issue.

So I'd be more in the camp of looking for a different solution than autotools.

Re:Timeline of the xz open source attack by jononor on Sunday April 07, 2024 @05:39AM (#39959613)
Yeah a lot of the complexity that configure scripts are supposed to solve are massively reduced now. Both because there is better harmonization between platforms, and many checks in a N year old are probably no longer relevant.

So a first pass should probably be to eliminate as much checks as possible. But there will almost always be a need for a couple of build time checks/switches - should be supported by some kind of tooling.

Re:Timeline of the xz open source attack by fl7305 on Sunday April 07, 2024 @08:21AM (#39960255)
I'm not very familiar with CMake, would it be viable and better to change over to that?
Re:Timeline of the xz open source attack by jononor on Monday April 08, 2024 @12:01PM (#39971034)
Cmake has a set of standardized macros to perform checks on the platform being built for. Including many specialized for typical usecases, like checking if a C header is present. And the generic CheckCompiles allows specifying a regex to match for check to be considered "failed".

https://cmake.org/cmake/help/latest/manual/cmake-modules.7.h...

So it seems considerably better than configure scripts. Probably also better than my idea :p I don't know how easy it would be for an adversary to do something "underhanded" though, or how easy that would be to spot such.