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
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
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
Anhad Singh
a97216aa93
misc(macros.rs): {e}print{ln} use format_args!()
...
Allows to capture identifiers in format strings.
Signed-off-by: Anhad Singh <andypython@protonmail.com >
2026-01-07 13:16:07 +11:00
Jeremy Soller
6e23a1342f
Merge branch 'pthread-timedwait' into 'master'
...
Implement pthread_cond_timedwait futex properly
See merge request redox-os/relibc!867
2026-01-06 12:05:13 -07:00
Jeremy Soller
5cae0f91ea
Merge branch 'utmp-wctype-cleanup' into 'master'
...
utmp and wctype header cleanup
See merge request redox-os/relibc!866
2026-01-06 06:24:37 -07:00
auronandace
0042a808b0
utmp and wctype header cleanup
2026-01-06 10:08:13 +00:00
Wildan M
10b5513e09
Fix other pthread tests
2026-01-06 16:12:50 +07:00
Wildan M
fab87ae2d8
Fix i586 compilation and add more checks
2026-01-06 15:56:57 +07:00
auronandace
9936d2e5d4
pwd and pty header cleanup
2026-01-06 08:56:04 +00:00
Wildan M
242ed32b42
Implement pthread_cond_timedwait futex properly
2026-01-06 15:33:58 +07:00
Wildan M
7d1c3961b5
Implement malloc_usable_size
2026-01-04 02:15:29 +07:00
auronandace
34c3ec3e6b
sys_auxv sys_file and sys_random header cleanup
2026-01-02 21:23:58 +00:00
auronandace
5576521c12
sys_time sys_timeb and sys_mman header cleanup
2026-01-02 18:24:01 +00:00
Jeremy Soller
5a1b5eab07
Merge branch 'inttypes-malloc-errno-cleanup' into 'master'
...
inttypes malloc and errno header cleanup
See merge request redox-os/relibc!856
2026-01-02 06:37:40 -07:00
auronandace
09c5eb43b7
inttypes malloc and errno header cleanup
2026-01-02 11:43:50 +00:00
auronandace
d00994be35
getopt cleanup
2026-01-02 09:01:31 +00:00
Jeremy Soller
2d6ae4a750
Merge branch 'p12' into 'master'
...
fix(string/memcmp): use `read_unaligned` where alignment is not guaranteed
See merge request redox-os/relibc!852
2026-01-01 07:17:18 -07:00
Anhad Singh
5f256f91cd
fix(string/memcmp): use read_unaligned where alignment is not guaranteed
...
Signed-off-by: Anhad Singh <andypython@protonmail.com >
2026-01-02 00:52:40 +11:00
auronandace
10218009d1
netinet_in netinet_tcp and net_if header cleanup
2025-12-31 19:57:21 +00:00
auronandace
911c36ecd3
time and utime header cleanup
2025-12-31 15:54:25 +00:00
auronandace
191b8b5f8b
crypt header cleanup
2025-12-31 13:58:44 +00:00
Jeremy Soller
05a3e9270e
Merge branch 'fix-dl-tls-i586-global_asm' into 'master'
...
re-add the global_asm macro import for i586
See merge request redox-os/relibc!848
2025-12-31 06:07:35 -07:00
Jeremy Soller
9540268e57
Merge branch 'arpa-inet-semaphore-cleanup' into 'master'
...
arpa_inet and semaphore header cleanup
See merge request redox-os/relibc!847
2025-12-31 06:05:03 -07:00
auronandace
0a9902d78f
re-add the global_asm macro import for i586
2025-12-31 09:53:06 +00:00
auronandace
6e25b2be7f
arpa_inet and semaphore header cleanup
2025-12-31 09:14:21 +00:00
Wildan M
baee8f2851
Add constants to complement ifaddrs.h
2025-12-31 16:03:03 +07:00
Jeremy Soller
806b3657f1
Merge branch 'setlocale-c' into 'master'
...
Fix setlocale with "C"
See merge request redox-os/relibc!845
2025-12-30 16:38:14 -07:00
auronandace
6696d26eb4
locale fnmatch dirent and ctype header cleanup
2025-12-30 20:57:47 +00:00
Wildan M
9734bdbde6
Fix setlocale with "C"
2025-12-31 02:29:55 +07:00
Jeremy Soller
0e506e97af
Merge branch 'locale-h' into 'master'
...
Implement more locale.h functions
See merge request redox-os/relibc!840
2025-12-29 10:00:44 -07:00
Jeremy Soller
15d82a9086
Merge branch 'master' into 'master'
...
fix(dl-tls): TLS overallocation
See merge request redox-os/relibc!843
2025-12-29 06:57:57 -07:00
Anhad Singh
75f6b9d64e
fix(dl-tls): TLS overallocation
...
* `offset` is the offset in TLS to copy initial data to NOT the segment
size
* Only zero the region which is required to be zeroed
Signed-off-by: Anhad Singh <andypython@protonmail.com >
2025-12-29 17:13:23 +11:00
Wildan M
8867ba80df
Remove bits/stdlib
2025-12-28 19:43:54 +07:00
Wildan M
e67933ef1b
Use POSIX localedef format
2025-12-28 03:24:20 +07:00
Wildan M
a5035d68e3
Implement more locale.h functions
2025-12-27 22:24:41 +07:00
Jeremy Soller
81569dea40
Merge branch 'master' into 'master'
...
fix(ld_so): minor fixes
See merge request redox-os/relibc!839
2025-12-26 08:09:12 -07:00
Anhad Singh
4245e9148e
fix(load_objects_recursive): TLS overallocation
...
Signed-off-by: Anhad Singh <andypython@protonmail.com >
2025-12-27 01:12:07 +11:00
Jeremy Soller
bb3cadfca4
Merge branch 'reduce-warn-2' into 'master'
...
Reduce cbindgen warning from errno.h
See merge request redox-os/relibc!838
2025-12-25 05:56:43 -07:00
Wildan M
8f97d2298a
Reduce cbindgen warning from errno.h
2025-12-25 16:50:26 +07:00
Wildan M
08485648f6
Convert strtold to Rust
2025-12-25 16:11:36 +07:00
Jeremy Soller
fbf280c3d7
Fix padding of infinite float
2025-12-24 20:32:54 -07:00
Jeremy Soller
f3afff08de
Adjust ftell for write buffer
2025-12-24 20:13:13 -07:00
auronandace
98d90ac580
revert previous 2 changes and add Safety note
2025-12-24 14:32:08 +00:00
auronandace
d4d82843de
fix type
2025-12-24 12:56:30 +00:00
auronandace
16f1f71acb
ensure internal memcpy does not copy past src or dest len
2025-12-24 12:42:28 +00:00
auronandace
4e744c3f55
only import the needed types
2025-12-24 11:05:12 +00:00
auronandace
96da8e5ed4
fix memccpy, copy correct amount of bytes and still copy if c not found
2025-12-24 11:02:15 +00:00
auronandace
6dd3a38f30
mark getpwnam as unsafe
2025-12-23 09:28:10 +00:00
auronandace
4786080073
only import needed types in syslog
2025-12-23 09:23:46 +00:00