Use-after-free is not always detected, but it is safe because it avoids using the same memory addresses, thereby preventing memory corruption. This test has an undetected use-after-free bug, however, its behavior is still well-defined and no memory corruption occurs.
The next Zig SHOWTIME will be something different.
Rather than speakers as usual, there will be special announcements regarding the future of the project.
One week from Saturday. Don't miss it.
I'm going to start a live stream in about 30 min. The topic will be Zig self-hosted compiler status update + demo, Tracy integration demo, and then all aboard the pull request merge train.
Silly but fun demo of self-hosted Zig progress:
It compiles a zig source file with 1,000,000 calls to print("hello world") in 0.67 seconds using 471 MiB resident memory. This is 8x as fast as clang on equivalent C code and 3x less memory.
I had an idea to improve the Zig tokenizer, and it turned out to be a good one!
throughput: 279 MiB/s => 347 MiB/s
Check out the diff - it's a great demo zig's comptime feature.
I should clarify: it's using libclang, which is a C++ library. There is a C API wrapper on top of that. Then it is Zig code that uses the libclang C API wrapper to translate C code into Zig source code, format it, and write it to a file.
But this is definitely a meaningful step towards a self-hosted compiler! Today 5,156 lines of C++ were deleted from the Zig source repository.
And now most open issues with regards to translating C code are labeled as "contributor friendly"
Open-source software, electronic music production, video game development
Server run by the main developers of the project It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!