Commit Graph

15020 Commits

Author SHA1 Message Date
gingerBill
37fffe78d6 Use bit_fields to describe internal break_state 2025-06-20 09:48:45 +01:00
gingerBill
f055d8e714 Slight change to un definition 2025-06-20 09:42:05 +01:00
gingerBill
9d15170928 Change types where possible to the correct ones 2025-06-20 09:29:41 +01:00
gingerBill
a449ad8ed8 Keep -vet happy 2025-06-20 09:20:50 +01:00
gingerBill
9a328e1c97 Use multiple return values where possible 2025-06-20 09:17:02 +01:00
gingerBill
c3e9b16d5a Update types 2025-06-20 09:09:04 +01:00
gingerBill
448702875e Add vendor:kb_text_shape to examples/all/all_vendor.odin 2025-06-20 09:05:50 +01:00
gingerBill
8f115c5bc8 Remove need for CRT with kb_text_shape and implement the allocating calls manually 2025-06-20 09:03:56 +01:00
gingerBill
c056fb7512 Update procs 2025-06-20 08:38:53 +01:00
gingerBill
61edcdbfc5 Add lib and build script (Windows Only) 2025-06-20 08:38:20 +01:00
gingerBill
63f1c5139a Add types and procs for kb_text_shape 2025-06-20 08:32:25 +01:00
gingerBill
365d9b0a63 Add kb_text_shape.h 2025-06-20 07:48:05 +01:00
Jeroen van Rijn
6ff5971e72 Merge pull request #5369 from Feoramund/fix-3435
Fix #3435
2025-06-20 02:26:24 +02:00
Feoramund
d307e44948 Add *.a to .gitignore 2025-06-19 20:03:45 -04:00
Feoramund
2c40a198fe Make check_all.sh executable, fix two typos 2025-06-19 20:03:37 -04:00
Feoramund
7022ad8378 Add test for issue #3435 2025-06-19 19:54:12 -04:00
Feoramund
c2f3d074e3 mem: Forbid construction of Buddy_Allocator with insufficient space
This takes into account eventual alignment.
2025-06-19 19:41:39 -04:00
Feoramund
57e2d8f1dd mem: Fix Buddy_Allocator size calculation to truly include alignment
This didn't take into account the size of the header plus the size of
the allocation itself by virtue of `align_forward_uint`; this could
result in no change if `size` was equal to `b.alignment` because the
number is aligned, and if `actual_size` and `size` ended up being equal,
no additional space would be requested.

This meant that a block would end up being allocated on top of its
buddy's head.

Fixes #3435
2025-06-19 19:41:38 -04:00
Feoramund
4e9f15965a mem: Fix inverted condition in buddy_allocator_alloc_bytes_non_zeroed
This was causing the procedure to find a block, then find one again,
or to not find a block and not try again.
2025-06-19 19:33:51 -04:00
Jeroen van Rijn
7d670cff0d Merge pull request #5367 from Kelimion/fix-5366
Fix #5366
2025-06-19 22:54:48 +02:00
Jeroen van Rijn
9c810e8340 Fix #5366 2025-06-19 22:46:51 +02:00
Jeroen van Rijn
69c0fe8305 Merge pull request #5344 from Feoramund/fix-2694
Review `core/mem/allocators.odin`
2025-06-19 18:35:17 +02:00
David Holland
0a45d4de0c Fix WAVEFORMATEX struct size (#5356)
* fix WAVEFORMATEX struct size
* fix size test for WAVEFORMATEX
* pack WAVEFORMATEXTENSIBLE
2025-06-18 12:25:09 +02:00
Jeroen van Rijn
12bd926f18 Merge pull request #5354 from Kelimion/init_net
Allow `core:net` to be imported with `-default-to-panic-allocator`.
2025-06-17 15:45:22 +02:00
Jeroen van Rijn
a65ece4426 Allow core:net to be imported with -default-to-panic-allocator. 2025-06-17 15:36:17 +02:00
Jeroen van Rijn
f3a52a632c Merge pull request #5351 from peperronii/master
Added GetThreadDescription kernel32.odin
2025-06-17 11:03:08 +02:00
PePerRoNii
a0e2931dc2 Added GetThreadDescription kernal32.odin 2025-06-17 15:36:48 +07:00
Jeroen van Rijn
91b5cec8e8 Merge pull request #5349 from Kelimion/check_all
Check all
2025-06-16 23:52:39 +02:00
Jeroen van Rijn
6d01aa9069 Appease -vet for haiku 2025-06-16 23:30:22 +02:00
Jeroen van Rijn
246deda2c5 Remove unneeded ; for essence 2025-06-16 23:03:07 +02:00
Jeroen van Rijn
29d9a12491 Add check_all scripts 2025-06-16 22:26:24 +02:00
Jeroen van Rijn
c4fb5ebf9b Merge pull request #5348 from Kelimion/get_env_buffer
Get env buffer
2025-06-16 20:51:06 +02:00
Jeroen van Rijn
b9809e7aa4 OpenBSD 2025-06-16 20:39:19 +02:00
Jeroen van Rijn
73dcc39d98 Fix macOS 2025-06-16 20:22:15 +02:00
Jeroen van Rijn
6347c87b5b Add buffered get_env variants to os2 2025-06-16 20:12:27 +02:00
Jeroen van Rijn
eef07431ef Factor out buffered utf helper. 2025-06-16 20:12:27 +02:00
Jeroen van Rijn
1a2f83f123 Add bring-your-own-buffer versions of os.lookup_env and os.get_env
And make `core:terminal` use it so that `core:log` can be imported with `-default-to-nil-allocator`,
in which the actual allocator is set up in `main()`.

Windows was tricky because of the utf-8 <> utf-16 conversion, so we use some temporary stack buffers for that purpose,
limiting the non-allocating version there to 512 utf-16 characters each for the key and environment value.

In general the value is (obviously) limited to the size of the supplied buffer, and a `.Buffer_Full` error is returned
if that buffer is insufficient. If the key is not found, the procedure returns `.Env_Var_Not_Found`.

TODO:
- Factor out buffer-backed utf8 + utf16 conversion to `core:sys/util` to more easily apply this pattern.
- Add similar `lookup_env` and `get_env` procedures to `core:os/os2`.

Fixes #5336
2025-06-16 20:12:26 +02:00
Jeroen van Rijn
03e5636abe Merge pull request #5347 from Feoramund/test-expect-assert
Let tests expect assertion failures and signals raised
2025-06-16 19:51:04 +02:00
Feoramund
36762ce081 Add tests for new test failure expectation API 2025-06-16 11:25:32 -04:00
Feoramund
71c6b0c8f0 testing: Add API to expect signals and assertion failures 2025-06-16 11:25:32 -04:00
Jeroen van Rijn
1bd48df41f Disable test_try_select_raw_happy 2025-06-16 12:59:24 +02:00
Jeroen van Rijn
d79d5237ad Merge pull request #5346 from Airtz/master
Fix typo in `error_article_table` lookup
2025-06-16 12:40:03 +02:00
Airtz
fe7fbfedc0 Fix typo in error_article_table lookup 2025-06-16 12:22:03 +02:00
Jeroen van Rijn
4281dc4999 Attempt fix brew errors (#5345)
Disable macOS Intel for now.
2025-06-16 12:06:20 +02:00
Jeroen van Rijn
9c9380d158 Merge pull request #5315 from peperronii/master
Expose getpeername() in core:net package as "peer_endpoint"
2025-06-16 11:30:34 +02:00
PePerRoNii
acdab793d9 Added Socket_Info_Error to Network_Error union 2025-06-16 16:17:48 +07:00
Jeroen van Rijn
795ceec2cd Merge pull request #5327 from nubunto/fix/pool-join-hangs
fix: pool_join hangs if no threads are started
2025-06-16 10:50:35 +02:00
Bruno Panuto
6874a4cdb0 fix: make pool_finish not hang when pool_start is not called 2025-06-16 00:28:43 -03:00
Feoramund
7526549e51 Disable usage of AddressSanitizer (pt. 2) 2025-06-15 15:34:18 -04:00
Feoramund
5e929b596d Merge branch 'master' into fix-2694 2025-06-15 15:30:26 -04:00