| Age | Commit message (Collapse) | Author |
|
* Truncate user and group ids
Calls to `getuid`, `getgid` and their `eid` variants fail to compile on
64bit Linux systems because the return value of the syscall is of
`usize` and needs to be truncated to fit the size of `uid_t` that is 32
bit.
Thanks to @FireFox317 for figuring this out in Zig's Discord channel!
* Add a regression test for user and group ids
* Replace @truncate with @intCast
This should be safe because `uid_t` will be 32-bit.
* Add missing import for getauxval
* Add missing package names
* Revert "Add missing import for getauxval"
This reverts commit 38f93dc89effdf657f2b81a56b96527ce4083f52.
* Skip user and group test if builtin.link_libc
|
|
`_proc` struct part contains an union for kill/cld parts.
see [siginfo_t](https://github.com/openbsd/src/blob/77c6c13150aaa9f0a29fe29b233c4436d1da01c0/sys/sys/siginfo.h#L132)
|
|
|
|
Everybody gets what they want!
* AT_RANDOM is completely ignored.
* On Linux, MADV_WIPEONFORK is used to provide fork safety.
* On pthread systems, `pthread_atfork` is used to provide fork safety.
* For systems that do not have the capability to provide fork safety,
the implementation falls back to calling getrandom() every time.
* If madvise is unavailable or returns an error, or pthread_atfork
fails for whatever reason, it falls back to calling getrandom() every
time.
* Applications may choose to opt-out of fork safety.
* Applications may choose to opt-in to unconditionally calling
getrandom() for every call to std.crypto.random.fillFn.
* Added `std.meta.globalOption`.
* Added `std.os.madvise` and related bits.
* Bumped up the size of the main thread TLS buffer. See the comment
there for justification.
* Simpler hot path in TLS initialization.
|
|
ad05509 introduced a fix for the wrong problem, the logic to align the
start of main_thread_tls_buffer was already there but was flawed.
Fix it for good and avoid wasting too many bytes for alignment purposes.
|
|
Before this change, thread local variables were landmines if LLVM
decided to optimize any writes to them using vector instructions.
|
|
|
|
This adds the missing baudrate constants for linux where I've used them
directly.
|
|
|
|
|
|
- addrinfo: addr and canonname are switched (wrong layout)
- addrinfo, Flock, msghdr struct: use proper c_xxx type instead of fixed size. it should help using struct on all architectures supported by openbsd
|
|
Use unmanaged containers in std.fs.Watch
|
|
|
|
|
|
|
|
I'm not sure this prefix-free style is a good idea, but let's roll with
it for the moment.
|
|
|
|
|
|
|
|
Xnu's sigaction() only supports fetching a limited set of sa_flags, test
SA_SIGINFO instead of SA_RESETHAND as that's supported everywhere.
Add another check to make sure SA_RESETHAND works.
Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
|
|
* Define siginfo and sigaction for Darwin
* Define sigaction/handler union for maximum libc compatibility
* Minor correction to some type definitions
|
|
Ooops.
|
|
Add a smoke test to prevent regressions.
|
|
Add io_uring TIMEOUT and TIMEOUT_REMOVE operations:
|
|
|
|
|
|
I observed this on Windows 10, trying to use MoveFileEx with
MOVEFILE_REPLACE_EXISTING | MOVEFILE_WRITE_THROUGH
to overwrite a running executable.
|
|
ring.timeout() to queue a IORING_OP_TIMEOUT operation
ring.timeout_remove() to queue a IORING_OP_TIMEOUT_REMOVE operation
io_uring_prep_timeout() to prep a IORING_OP_TIMEOUT sqe
io_uring_prep_timeout_remove() to prep a IORING_OP_TIMEOUT_REMOVE sqe
|
|
|
|
|
|
|
|
|
|
fork() on Linux/sparc64 seems to return its result in two registers,
with %o0 always holding the current process' PID, and the parent/child
status returned in %o1. Add some glue code to convert those into
the libc-style return value.
|
|
|
|
Find the effective ELF load address in dl_iterate_phdr by computing the
difference between the in-memory phdr and its p_vaddr specified in the
ELF file.
This makes the dl_iterate_phdr test pass and restores the stack traces.
|
|
Thanks @daurnimator for catching this.
|
|
This is the part of #3960 that has to be rewritten to apply to latest
master branch code.
|
|
Conflicts:
lib/std/dynamic_library.zig (fixed in this commit)
src/all_types.hpp
src/codegen.cpp
src/link.cpp
src/main.cpp
Will manually apply the diffs to these deleted files to the new zig
code in a followup commit.
|
|
|
|
|
|
Co-authored-by: daurnimator <quae@daurnimator.com>
|
|
|
|
|
|
Make the PPC64 port usable
|
|
|
|
|
|
One more variation in the syscall table, hooray!
|
|
stage1: Compile error instead of falling back to C for unsupported cc
|
|
|
|
|