Commit Graph

3465 Commits

Author SHA1 Message Date
sourceturner f72ecfd8dc Use unsafe blocks in string.h implementation 2026-01-16 21:49:01 +00:00
sourceturner b3f7db83cf Use unsafe blocks in stdio.h implementation 2026-01-16 21:49:01 +00:00
sourceturner b3add24654 Use unsafe blocks in signal.h implementation 2026-01-16 21:49:01 +00:00
sourceturner a426887528 Use unsafe blocks in semaphore.h implementation 2026-01-16 21:49:01 +00:00
sourceturner 2e055a6d98 Use unsafe blocks in regex.h implementation 2026-01-16 21:49:01 +00:00
sourceturner 23fb2dd042 Use unsafe blocks in pwd.h implementation 2026-01-16 21:49:01 +00:00
sourceturner c22fa8af96 Use unsafe blocks in net_if.h implementation 2026-01-16 21:49:01 +00:00
sourceturner a27518ef2f Use unsafe blocks in malloc.h implementation 2026-01-16 21:49:01 +00:00
sourceturner 827df02158 Use unsafe blocks in locale.h implementation 2026-01-16 21:49:01 +00:00
sourceturner 12807920b6 Use unsafe blocks in ifaddrs.h implementation 2026-01-16 21:49:01 +00:00
sourceturner d539b134ef Use unsafe blocks in float.h implementation 2026-01-16 21:49:01 +00:00
Jeremy Soller 375061a69c Add sys/sysmacros.h from musl (fixes last commit) 2026-01-16 12:47:06 -07:00
Jeremy Soller 03c370d7f3 Fix dev_t type and add sys/sysmacros.h include from musl 2026-01-16 12:42:58 -07:00
Jeremy Soller 391baf41f2 Merge branch 'mutex-fork-test' into 'master'
Add fork inside thread test

See merge request redox-os/relibc!886
2026-01-16 05:31:14 -07:00
Wildan M d33bf64e5f Remove the mutex, just fork and threads 2026-01-16 13:26:16 +07:00
Wildan M fd616a9704 Add mutex inside fork test 2026-01-16 13:21:51 +07:00
Jeremy Soller b833e44293 Revert "Remove bits/stdlib"
This reverts commit 8867ba80df.
2026-01-15 18:40:23 -07:00
Jeremy Soller 40c9c14ea8 Revert "Convert strtold to Rust"
This reverts commit 08485648f6.
2026-01-15 18:31:47 -07:00
Jeremy Soller c8b4a03b45 Merge branch 'sys-socket-tests-2' into 'master'
Add more sys_socket tests, fix linux ARM compilation

See merge request redox-os/relibc!885
2026-01-15 17:57:43 -07:00
Wildan M 3bf35abeae Add more sys_socket tests 2026-01-16 07:18:13 +07:00
Wildan M fe6ad62ed8 Allow missing stderr file in expected tests 2026-01-16 07:10:28 +07:00
Wildan M e69e0b937e Fix linux aarch64 compilation 2026-01-16 07:09:57 +07:00
Jeremy Soller 8f0bdf95cc Merge branch 'recvfrom-uds' into 'master'
Append inner_af_unix with null, workaround unix dgram getpeername

See merge request redox-os/relibc!884
2026-01-15 14:26:07 -07:00
Wildan M e14a03fea4 Handle getpeername other error 2026-01-15 07:31:30 +07:00
Wildan M af7636daba Enable unix tests 2026-01-15 05:34:53 +07:00
Wildan M aa4572b613 Append inner_af_unix with null, workaround unix dgram getpeername 2026-01-15 05:26:44 +07:00
Jeremy Soller 57d300ce63 Merge branch 'add-mkdirat' into 'master'
Implement mkfifoat(2)

See merge request redox-os/relibc!881
2026-01-12 19:25:27 -07:00
Connor-GH da140913bc Implement mkfifoat(2) 2026-01-13 01:40:25 +00:00
Jeremy Soller 5265b732cc strtok_r: return the end of s in lasts when finished and only reference musl 2026-01-12 14:56:40 -07:00
Jeremy Soller 5b0c8b361b Merge branch 'master' into 'master'
add mathematical constants

See merge request redox-os/relibc!880
2026-01-12 12:38:28 -07:00
Pascal Reich 08f93dfbdc add mathematical constants 2026-01-12 12:38:28 -07:00
Jeremy Soller ffce2c2d25 Merge branch 'fix-ppoll' into 'master'
Handle signal mask in epoll_pwait

See merge request redox-os/relibc!879
2026-01-09 14:32:38 -07:00
Jeremy Soller b9fc058a47 Remove finished todo 2026-01-09 13:34:15 -07:00
Jeremy Soller a04c27a71e Early exit from poll if there are fds, and all are closed 2026-01-09 12:59:00 -07:00
Jeremy Soller 0a9095bb17 Fix epoll_pwait callback internally handling EINTR 2026-01-09 12:21:38 -07:00
Jeremy Soller d8f47cf5fb Handle signal mask in epoll_pwait 2026-01-09 11:46:54 -07:00
Jeremy Soller c433f39788 Merge branch 'add-mkdirat' into 'master'
Implement mkdirat

See merge request redox-os/relibc!878
2026-01-09 06:09:09 -07:00
Jeremy Soller 88b5a95da4 Merge branch 'p12' into 'master'
fix(pthread): use spinlock before the TCB has been activated

See merge request redox-os/relibc!875
2026-01-09 06:02:02 -07:00
Anhad Singh df647941c5 misc(pthread): remove the need for tid_mutex
Signed-off-by: Anhad Singh <andypython@protonmail.com>
2026-01-09 22:55:58 +11:00
Connor-GH 75ca2cf29e Implement mkdirat
Linux's variant uses the syscall as intended. Redox's variant uses fpath to build a path to pass to mkdir from the file descriptor plus the file name, which isn't atomic due to the fpath lookup being subject to TOCTOU when paired with mkdir.
2026-01-08 17:56:49 -06:00
Jeremy Soller d5bf6db1b6 Merge branch 'inet-syscall' into 'master'
Adapt inet socket implementing SYS_CALL

See merge request redox-os/relibc!877
2026-01-08 08:52:30 -07:00
Jeremy Soller 0caf852888 Merge branch 'fix-accept-hang' into 'master'
Fix accept() hang, don't accept() on recvfrom

See merge request redox-os/relibc!876
2026-01-08 06:12:07 -07:00
Anhad Singh 665d2d489a fix(pthread): use spinlock before the TCB has been activated
Co-authored-by: @4lDO2
Signed-off-by: Anhad Singh <andypython@protonmail.com>
2026-01-08 16:28:56 +11:00
Jeremy Soller 2c11d0f3cb Merge branch 'p12' into 'master'
fix(ld_so/dso): `TPOFF` with undefined symbol index

See merge request redox-os/relibc!874
2026-01-07 22:10:05 -07:00
Anhad Singh 79c0df3dda fix(ld_so/dso): TPOFF with undefined symbol index
Fixes random `rustc` errors/page fault:
```
Dump of assembler code for function _RNvYNCNkNvNtNtCskfd1poFMNVt_21rustc_data_structures4sync12worker_local8REGISTRY00INtNtNtCs713rKgAoQ4g_4core3ops8function6FnOnceTINtNtB1o_6option6OptionQIB23_INtNtNtB1o_4cell4once8OnceCellNtB8_8RegistryEEEEE9call_onceBc_:
   0x0000000007651e50 <+0>:	41 56              	push   r14
   0x0000000007651e52 <+2>:	53                 	push   rbx
   0x0000000007651e53 <+3>:	50                 	push   rax
   0x0000000007651e54 <+4>:	48 8b 1d 6d 9c 46 02	mov    rbx,QWORD PTR [rip+0x2469c6d]        # 0x9abbac8
   0x0000000007651e5b <+11>:	64 48 8b 04 25 00 00 00 00	mov    rax,QWORD PTR fs:0x0
   0x0000000007651e64 <+20>:	0f b6 4c 18 08     	movzx  ecx,BYTE PTR [rax+rbx*1+0x8]
   0x0000000007651e69 <+25>:	48 01 d8           	add    rax,rbx
   0x0000000007651e6c <+28>:	83 f9 01           	cmp    ecx,0x1
   0x0000000007651e6f <+31>:	74 07              	je     0x7651e78 <_RNvYNCNkNvNtNtCskfd1poFMNVt_21rustc_data_structures4sync12worker_local8REGISTRY00INtNtNtCs713rKgAoQ4g_4core3ops8function6FnOnceTINtNtB1o_6option6OptionQIB23_INtNtNtB1o_4cell4once8OnceCellNtB8_8RegistryEEEEE9call_onceBc_+40>
   0x0000000007651e71 <+33>:	83 f9 02           	cmp    ecx,0x2
   0x0000000007651e74 <+36>:	75 0a              	jne    0x7651e80 <_RNvYNCNkNvNtNtCskfd1poFMNVt_21rustc_data_structures4sync12worker_local8REGISTRY00INtNtNtCs713rKgAoQ4g_4core3ops8function6FnOnceTINtNtB1o_6option6OptionQIB23_INtNtNtB1o_4cell4once8OnceCellNtB8_8RegistryEEEEE9call_onceBc_+48>
   0x0000000007651e76 <+38>:	31 c0              	xor    eax,eax
   0x0000000007651e78 <+40>:	48 83 c4 08        	add    rsp,0x8
   0x0000000007651e7c <+44>:	5b                 	pop    rbx
   0x0000000007651e7d <+45>:	41 5e              	pop    r14
   0x0000000007651e7f <+47>:	c3                 	ret
   0x0000000007651e80 <+48>:	48 8d 35 69 11 00 00	lea    rsi,[rip+0x1169]        # 0x7652ff0 <_RINvNtNtNtNtCs7Gz96wxcBnT_3std3sys12thread_local6native5eager7destroyINtNtNtCs713rKgAoQ4g_4core4cell4once8OnceCellNtNtNtCskfd1poFMNVt_21rustc_data_structures4sync12worker_local8RegistryEEB1U_.llvm.5183627946997663933>
   0x0000000007651e87 <+55>:	48 89 c7           	mov    rdi,rax
   0x0000000007651e8a <+58>:	49 89 c6           	mov    r14,rax
   0x0000000007651e8d <+61>:	ff 15 c5 6b 47 02  	call   QWORD PTR [rip+0x2476bc5]        # 0x9ac8a58
   0x0000000007651e93 <+67>:	4c 89 f0           	mov    rax,r14
   0x0000000007651e96 <+70>:	64 48 8b 0c 25 00 00 00 00	mov    rcx,QWORD PTR fs:0x0
    # rcx = 0x20aeb000 [FSBASE]
    # rbx = 0x2b40
   0x0000000007651e9f <+79>:	c6 44 19 08 01     	mov    BYTE PTR [rcx+rbx*1+0x8],0x1 # <--- PAGE FAULT
   0x0000000007651ea4 <+84>:	48 83 c4 08        	add    rsp,0x8
   0x0000000007651ea8 <+88>:	5b                 	pop    rbx
   0x0000000007651ea9 <+89>:	41 5e              	pop    r14
   0x0000000007651eab <+91>:	c3                 	ret
```

Signed-off-by: Anhad Singh <andypython@protonmail.com>
2026-01-08 11:45:36 +11:00
Wildan M f56bfc4883 Adapt inet socket implementing SYS_CALL 2026-01-08 04:05:19 +07:00
Wildan M ad3a39771b Add more test 2026-01-08 01:42:46 +07:00
Wildan M 02752dda27 Enable some tests 2026-01-07 22:59:34 +07:00
Wildan M 99c942318a Fix inet hang, don't accept() on recvfrom 2026-01-07 22:59:20 +07:00
Jeremy Soller 8c20bc7899 Merge branch 'sys-socket-tests' into 'master'
Add sys_socket tests, Update failing tests

See merge request redox-os/relibc!872
2026-01-07 07:03:07 -07:00