Commit Graph

301 Commits

Author SHA1 Message Date
dmex 62b7b77a65 Add safe zeroed heap allocation helpers
Introduce `PhAllocateHeap` and `PhReAllocateExSafe` in `phlib/basesup.c` to provide heap allocation paths with explicit `NTSTATUS` handling and zero-initialization support. The debug-heap path now also honors `HEAP_ZERO_MEMORY`, keeping allocation behavior consistent between debug and normal builds.
2026-09-25 10:14:51 +10:00
dmex fd5ff3dc8a Fix AVX-512 conversion paths
Correct the AVX-512 implementations in `phlib/basesup.c` by restoring the proper types, intrinsics, and comments for the float-to-ulong and ulong-to-float copy helpers. This fixes the two fast paths being accidentally swapped while keeping the scalar conversion semantics intact.
2026-09-25 04:45:26 +10:00
dmex 415353f50b Improve timing and bitmap helpers
Harden the low-level time/query helpers by using ordered shared-data reads, adding unbiased interrupt time support, and introducing a more precise QPC fast path for x64/ARM64. The update also raises queued work item priority, adds missing bitmap utility routines, and improves several hot memory/entropy paths with AVX-512 and histogram optimizations.
2026-09-25 04:42:32 +10:00
dmex abe198c0f0 Remove dead code, Improve consistency and minor issues
This changeset tightens cache file path handling in phlib by validating leaf names, honoring native vs Win32 path modes consistently, and using the correct directory creation path. It also fixes several functional regressions across the app and plugins: module list filter refresh after highlight toggles, ETW endpoint/port mapping, aggregate sort field usage, graph child window clipping, safer uninstall status text handling, previous-instance shutdown in setup, and improved window-message timeout handling. Additional updates clean up initialization/casts, remove dead code, and address small correctness issues in formatting and utility logic.
2026-07-15 20:19:49 +10:00
dmex 15ec45a121 Update copyright year 2026-07-01 01:43:30 +10:00
dmex e3c623fbdd Add PhCountBitsUlong64, tabnew header and CLR fixes 2026-06-16 06:30:56 +10:00
dmex a571c6bc19 Build and bug fixes 2026-06-15 05:33:51 +10:00
dmex 2447dec66d Add PhAddMemoryUlong 2026-06-01 04:36:25 +10:00
dmex 309f34d82c Add PhGetItemPointerList 2026-06-01 04:34:54 +10:00
dmex 9691272db1 Update basesup.c 2026-05-21 05:48:07 +10:00
dmex 3ca091fd92 Add size_t conversion helpers 2026-05-16 02:50:15 +10:00
dmex 607815f5a5 Add SAL annotations for PhGetLastError 2026-05-05 21:49:40 +10:00
dmex a9063a99d8 Update FNV-1a 32-bit hash and constants required by RFC 9923 2026-05-05 01:58:38 +10:00
dmex 9467d5f646 Improve DPI handling, icon scaling, metrics (#2894) 2026-05-02 09:13:06 +10:00
dmex 297b9c9a61 Fix experimental AVX u32->float/double conversion
Correct several bugs and improve correctness/safety in basesup.c:

- Fix misleading/incorrect parameter comments for virtual memory APIs (BaseAddress semantics and read/write descriptions).
- Adjust PhProtectVirtualMemory to only store OldProtection when caller provided a pointer and to preserve the function's original status return path.
- Restrict the AVX512 fast path to 64-byte aligned From/To addresses to avoid misaligned vector accesses.
- Implement exact unsigned 32-bit to float/double conversion for AVX/AVX2/SSE code paths by clearing the sign bit and adding 2^31 when needed (added masks and scale constants), and simplify shuffles for the SSE path.

These changes fix correctness issues when converting uint64 values via decomposed 32-bit lanes, and prevent unsafe vectorized memory access on unaligned buffers.
2026-04-17 01:34:54 +10:00
dmex 3d68a6c146 Use NoFence or debug/callback lists 2026-04-07 23:21:10 +10:00
dmex c5033bd98c Update basesup.c 2026-04-05 20:58:50 +10:00
dmex 34016e27d9 Apply SAL annotations fixes and add annotations 2026-04-01 12:11:37 +11:00
dmex 4f6c9ad5c9 Remove casts 2026-03-25 01:22:52 +11:00
dmex 1a3ebbb2b3 Update SAL annotations for memory functions 2026-02-23 10:32:26 +11:00
dmex f56561c8b6 Update SAL annotations 2026-02-12 19:53:04 +11:00
dmex 0bcba66aa0 Reorganize functions into basestring.c 2026-01-16 15:26:29 +11:00
dmex a3c962535e Expand and improve SIMD and AVX 2026-01-13 17:36:10 +11:00
dmex 705c84584f Add AVX and SIMD to PhEqualStringRef/PhCompareStringRef/PhFindStringInStringRef/PhFindCharInStringRef/PhFindLastCharInStringRef 2026-01-13 11:29:20 +11:00
dmex 6681f07d83 Add asserts to PhDeleteCallback 2026-01-11 11:50:47 +11:00
dmex 1ea6d89398 Update PhCountStringZ with AVX 2026-01-11 11:49:25 +11:00
dmex 947c4ff50e Partial revert for more testing fe130a3b02 2026-01-07 09:43:07 +11:00
dmex fe130a3b02 Move PhCreateBytes/PhAppendBytesBuilder2, Update string functions 2026-01-07 02:42:40 +11:00
dmex 0de94fefc5 Add IS_ALIGNED 2026-01-04 07:27:27 +11:00
dmex 2796fcdb6d Add IS_ALIGNED 2026-01-04 07:27:20 +11:00
dmex 669fa28b24 Add IS_ALIGNED 2026-01-04 07:10:47 +11:00
dmex 172403a27a Add PhDoesNameContainWildCards, PhIsNameInExpression, PhStringFuzzyMatch 2026-01-02 09:56:03 +11:00
dmex a20438c191 Update basesup.c 2025-12-31 06:02:11 +11:00
dmex 799e486943 Fix and improve SIMD intrinsics 2025-12-31 02:54:24 +11:00
dmex bd9effd7b0 Update documentation and types 2025-12-12 19:42:59 +11:00
dmex f6224b9615 Update comments, Update SAL annotations, Fix typos and memory leak 2025-12-06 08:22:09 +11:00
dmex 37306cdeae Disable rdtscp #2718 2025-11-17 23:45:21 +11:00
dmex d4698f7ab9 Fix #2718 2025-10-22 16:10:44 +11:00
dmex aaeba133fa Fix AVX block size, Add PhConvertCopyMemoryUlong64 2025-09-28 05:46:09 +10:00
dmex 954ce4ba24 Fix cmake build for ARM64 2025-09-23 11:59:59 +10:00
dmex 09135fc5e6 Update build config 2025-09-23 11:42:53 +10:00
dmex c860c19d86 Revert 1fa1bf1c2 2025-09-23 08:36:25 +10:00
dmex f944f0980f Add PhWriteVirtualMemory 2025-09-22 19:09:44 +10:00
dmex 1fa1bf1c2b Move PhReadTimeStampCounter 2025-09-22 18:55:57 +10:00
dmex 89defc9229 Update comments 2025-09-20 08:52:56 +10:00
dmex 5423ff7cfb Merge dev branch fixes (#2680) 2025-09-07 05:06:34 +10:00
dmex 6c20c78fb6 Merge minor fixes from dev branch 2025-08-20 11:54:19 +00:00
dmex b420f1c018 Add ifdefs for wcschr 2025-06-13 04:51:04 +10:00
dmex 868d5ce2b6 Update to latest SDK 2025-05-23 13:23:34 +10:00
dmex 5778b4a36b Update to latest SDK 2025-05-23 03:15:54 +10:00