Go to file
Frank Denis e7f872c9c6
wasi-libc: compile emmalloc.c without strict aliasing (#16157)
emmalloc.c does a fair amount of type punning in order to access
the size of memory regions and traverse them.

Unfortunately, that can lead to unwanted optimizations.

This simple test case currently triggers a memory fault:

int main(void) {
    char * volatile p = malloc(1);
    p = realloc(p, 12);
    p = malloc(1);
    printf("%p\n", p);
}

Work around this by adding "-fno-strict-aliasing" when compiling
that file.
2023-06-25 11:24:54 +02:00
.github CI: -x86_64-macos-debug, +aarch64-macos-debug 2023-06-21 00:37:58 -07:00
ci CI: -x86_64-macos-debug, +aarch64-macos-debug 2023-06-21 00:37:58 -07:00
cmake update Findllvm.cmake static lib list to LLVM 16 2023-01-29 20:11:14 -07:00
doc langref: update to new cast builtin syntax 2023-06-24 16:56:39 -07:00
lib all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
src wasi-libc: compile emmalloc.c without strict aliasing (#16157) 2023-06-25 11:24:54 +02:00
stage1 update zig1.wasm 2023-06-24 16:56:54 -07:00
test Merge pull request #16188 from kcbanner/fix_cbe_airErrUnionPayloadPtrSet 2023-06-24 21:53:59 -07:00
tools all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
.gitattributes
.gitignore
build.zig build.zig: bump maxrss upper bound for std lib tests 2023-06-23 12:13:42 -04:00
CMakeLists.txt cmake: fix typo in flag value for single threaded build 2023-06-24 13:51:42 -07:00
LICENSE
README.md

ZIG

A general-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.

Resources

Installation

License

The ultimate goal of the Zig project is to serve users. As a first-order effect, this means users of the compiler, helping programmers to write better software. Even more important, however, are the end-users.

Zig is intended to be used to help end-users accomplish their goals. Zig should be used to empower end-users, never to exploit them financially, or to limit their freedom to interact with hardware or software in any way.

However, such problems are best solved with social norms, not with software licenses. Any attempt to complicate the software license of Zig would risk compromising the value Zig provides.

Therefore, Zig is available under the MIT (Expat) License, and comes with a humble request: use it to make software better serve the needs of end-users.

This project redistributes code from other projects, some of which have other licenses besides MIT. Such licenses are generally similar to the MIT license for practical purposes. See the subdirectories and files inside lib/ for more details.