Commit Graph
62 Commits
Author SHA1 Message Date
Lucas Perlind 11d2a9c867 Enable asan for windows and ubuntu CI tests
Other platforms either do not support asan at all or they
fail to link with the asan runtime.
2025-05-09 15:39:39 +10:00
Lucas Perlind f5b947ea73 Fix linux 2025-05-08 17:45:29 +10:00
Lucas Perlind 14c5096b81 Improve assert information 2025-05-08 17:41:03 +10:00
Lucas Perlind 9f2d008a8a Remove TEMP_ALLOCATOR_GUARD wrapper 2025-05-08 17:41:03 +10:00
Lucas Perlind 5292a7f4f3 Fix posix 2025-05-08 17:41:03 +10:00
Lucas Perlind 1bea59ee68 Fix linux 2025-05-08 17:41:03 +10:00
Lucas Perlind 190960e103 fix -vet 2025-05-08 17:41:03 +10:00
Lucas Perlind b9db1dd3e0 os2: Resolve temp allocator collisions 2025-05-08 17:41:01 +10:00
Lucas Perlind 46e0c7ad74 Cleanup 2025-05-07 11:30:58 +10:00
Lucas Perlind fd05f55691 Fix wasi_wasm 2025-05-06 15:23:44 +10:00
Lucas Perlind 83bc2d3c4a Add asan support for various allocators 2025-05-06 14:55:50 +10:00
Lucas Perlind 5c73b4ef58 Add attribute @(no_sanitize_address)
The purposes of this attribute is to let procedures opt-out of being
instrumented with asan. Typically an allocator that includes 'in-band'
meta-data will be accessing poisoned values (such as tlsf).

Making asan work with these allocators becomes very challenging so
just being to ignore asan within specific allocator procedures
makes it easier to reason and removes the need to temporarily
poison and unpoison allocator data.
2025-05-01 20:42:21 +10:00
Lucas Perlind 4763da4b0d Document base:sanitizer 2025-04-29 19:06:09 +10:00
Lucas Perlind 51d427f424 Remove vet explicit allocators from cli 2025-04-28 19:33:37 +10:00
Lucas Perlind 65b4c793f0 Add -vet-explicit-allocators
This vet flag will make it so that allocators must be explicitly used
in places where context.allocator and context.temp_allocator are a
procedure parameter.

The goal of this flag is to prevent using the context.allocator in
cases where a different allocator was meant to be used.
Some code bases default context.allocator to nil/panic allocator
to catch this at runtime. This effectively makes it a compile
time error instead.
2025-04-27 22:47:03 +10:00
Lucas Perlind 5e985bcd74 Remove dependency on runtime; Add to examples 2025-04-24 20:34:32 +10:00
Lucas Perlind 5c117bde6d Add base:sanitizer package 2025-04-24 20:28:32 +10:00
Lucas Perlind 7502e7f2bc make asan procs contextless 2025-04-24 19:56:40 +10:00
Lucas Perlind 4a0be1f3a8 make vet happy 2025-04-24 16:02:31 +10:00
Lucas Perlind ab0b26e876 Add more asan support to the odin runtime and begin sanitizing
allocators

This adds various bindings to the asan runtime which can be used
to poison/unpoison memory handed out by various allocators. This
means we can catch use after free memory bugs when using operations
such as free_all during runtime.

Asan poisoning are added for the follow allocators in mem:
Arena (including temporary arenas)
Scratch
Stack
Small_Stack

Additionally a bug in the stack allocator was fixed to disallow freeing
in the middle of the stack (caught by the asan!).

I plan on adding support for all the allocators in core. This is just
a good starting point and were some of the easiest ones to implement
asan for.
2025-04-24 15:17:51 +10:00
Lucas Perlind 88a5817134 Fix tlsf block adjustment 2025-02-10 13:01:16 +11:00
Lucas Perlind 932fcaee6b remove GAMEINPUT prefix 2025-02-07 09:49:04 +11:00
Lucas Perlind cb10a060f1 Trailing commas 2025-02-06 15:03:56 +11:00
Lucas Perlind 24496c4046 Add game input to examples import 2025-02-06 14:57:47 +11:00
Lucas Perlind d1d0f0e9b7 Update 4 review 2025-02-06 14:56:37 +11:00
Lucas Perlind 9cbbe72f6f Add windows game input to vendor 2025-02-03 10:33:32 +11:00
Lucas Perlindandflysand7 fc3ea5b3d9 core/unicode/utf16: add rune_count proc
This returns the number of runes in a u16 slice
2024-12-01 11:54:50 +11:00
Lucas Perlindandflysand7 28d01ce7b5 cached.cpp: Improve internal cached robustness
Do not memory map files; Windows cannot write to a file that is memory
mapped.
Write cache after llvm building. This ensures the cache won't have a
false positive if llvm fails.
2024-12-01 11:54:50 +11:00
Lucas Perlind 28b26043fb cached.cpp: Improve internal cached robustness
Do not memory map files; Windows cannot write to a file that is memory
mapped.
Write cache after llvm building. This ensures the cache won't have a
false positive if llvm fails.
2024-10-22 18:05:01 +11:00
Lucas Perlind 66c53a1174 core/unicode/utf16: add rune_count proc
This returns the number of runes in a u16 slice
2024-10-21 08:29:07 +11:00
Lucas Perlind a71cd07b36 Update "core:runtime" to "base:runtime" 2024-04-07 09:02:01 +10:00
Lucas Perlind 9469b90b01 Add ID3DUserDefinedAnnotation 2024-02-13 17:13:17 +11:00
Lucas Perlind 6df07a2c0a Remove bounds checking on a lot of linalg 2024-02-13 10:23:29 +11:00
Lucas Perlind c0d407a2b4 Revert "Change minor/adjoint to be row, col from c, r to be consistent with [row, col] syntax; Add #no_bounds_check were appropriate"
This reverts commit 5dd2e38aff.
2024-02-13 10:13:34 +11:00
Lucas Perlind 8777fa1c04 Add more window procedures 2024-02-09 14:04:16 +11:00
Lucas Perlind 67d5b97ff9 Fix linalg shadowing error 2024-01-09 10:24:12 +11:00
Lucas Perlind 12b8f91249 Format hidpi.odin 2023-12-14 10:29:50 +11:00
Lucas Perlind e410908ce8 Add Hidpi to Windows 2023-12-12 12:14:18 +11:00
Lucas Perlind 7cc5177078 Fixed up missing output for rand examples 2023-09-27 16:34:19 +10:00
Lucas Perlind b31d8b1ad0 Update rand documentation about floats 2023-08-16 21:13:56 +10:00
Lucas Perlind ebe5636307 Document core:math/rand and add 'possible output'
Possible output allows us to just type check a test
and have some sort of output field in the docs but
not actually verify it matches stdout
2023-05-31 09:49:12 +10:00
Lucas Perlind e0d9092df8 Document return values of strings and add allocator errors where
possible
2023-04-07 20:39:01 +10:00
Lucas Perlind 0af1b75a02 Re-enable documentation CI and improve error messages 2023-04-07 09:16:50 +10:00
Lucas Perlind c59ad24856 Make tests scripts error if a test fails
Additionally fixes tests that were found broken because
of this.
2023-04-03 16:49:14 +10:00
Lucas Perlind 08bc6a1698 Fix type comparison not accounting for parapoly params 2023-04-03 12:47:28 +10:00
Lucas Perlind 67e6f57192 Small improvements strings documentation
* Use new 'Returns:' and 'Inputs:' keywords used by the website generator
* Make order item order resemble website, i.e. 'Returns:' comes before
  'Example:'
* Add a few missing input items
* Add a few missing return items
2023-04-03 08:44:14 +10:00
Lucas Perlind 6ff0cc0b40 Enforce example names in documentation 2023-04-01 09:13:15 +11:00
Lucas Perlind 22e0f5ecd0 Add documentation tester and make it apart of CI workflow 2023-03-30 18:14:57 +11:00
Lucas Perlind 84d8798ad3 Fix website formatting and incorrect examples 2023-03-29 12:19:05 +11:00
Lucas Perlind 50d8dc91cf Improve raylib overview formatting on pkg website 2023-03-22 20:19:53 +11:00
Lucas Perlind bb72c804fb Document core:dynlib 2023-03-02 19:20:45 +11:00
Lucas Perlind f040ef41cb Fix a few bindings in NSApplicationDelegate 2023-01-19 21:18:30 +11:00
Lucas Perlind f029b4beb1 Add more utility procedures to small array 2022-12-21 13:00:33 +11:00
Lucas Perlind 73c1f08776 Improve error messages with 'using _' 2022-10-15 19:46:17 +11:00
Lucas Perlind e188a542da llvm_backend_debug: Add debug info for soa pointer
This fixes issue #2113
2022-10-08 17:08:28 +11:00
Lucas Perlind 64f1e8b7a2 Github CI: Add test case for issue 2113 2022-10-08 17:07:29 +11:00
Lucas Perlind f3f51bd643 Kernel32: Add more window bindings and improve consistency 2022-09-01 22:57:27 +10:00
Lucas Perlind d9adb0fd6b Add much of Win32's Raw Input API 2022-08-28 16:30:55 +10:00
Lucas Perlind 43b78e51a4 Add ID3D11Debug interface to d3d11 package 2022-08-10 22:28:24 +10:00
Lucas Perlind 6d354524e2 * Add split_by_byte_iterator. It functions exactly like split_iterator but takes in a byte seperator rather than a string seperator.
The intention is to provide a faster split parsing if the seperator is known to be byte size.
2022-03-21 21:39:30 +11:00
Lucas Perlind 34187424b8 Add unregister_class_a and unregister_class_w for windows bindings 2022-03-18 19:35:36 +11:00
Lucas Perlind 507722954c Improve core:fmt formatting
* Strings will respect widths smaller than the string's length
* Strings are right justified by default like integers
* Strings accept '-' flag to be left justified
* Booleans will be formatted like strings
* Enums will be formatted like strings
2022-03-02 16:22:16 +11:00