Levi Neely
4830df3cbd
Replace all realloc() calls with pmem_realloc()
2026-03-08 21:31:02 +01:00
Levi Neely
641709c03d
Fix rpcclient.cpp mixed allocation - use pmem_free for prpc_sockpath
2026-03-08 21:25:14 +01:00
Levi Neely
81f28b6611
Fix all list free wrapper functions - add proper definitions
2026-03-08 20:13:15 +01:00
Levi Neely
df102c98f3
Fix all psync_list_for_each_element_call to use pmem_free wrappers
2026-03-08 20:05:32 +01:00
Levi Neely
bad3430968
Fix pfolder.c psync_free_string_list to use pmem_free()
2026-03-08 20:03:15 +01:00
Levi Neely
a7c2de9b21
Migrate pclsync_lib.cpp free() calls to pmem_free()
2026-03-08 20:01:10 +01:00
Levi Neely
82226831df
Add missing pmem.h include to pdevice.c
2026-03-08 19:57:31 +01:00
Levi Neely
a0535bcadd
Fix pnetlibs_debug.c free() call - migrate to pmem_free()
2026-03-08 19:56:00 +01:00
Levi Neely
7f24fabc54
Fix all remaining stray free() calls - migrate to pmem_free()
2026-03-08 19:55:21 +01:00
Levi Neely
9cb9cfccbd
Migrate psettings.c free() calls to pmem_free()
2026-03-08 19:51:02 +01:00
Levi Neely
506de72ab0
Fix prand.c mixed allocation - use pmem_free for putil_strdup result
2026-03-08 19:49:16 +01:00
Levi Neely
deb61a40f8
Fix pmem.c infinite recursion - use raw malloc/free internally
2026-03-08 19:30:22 +01:00
Levi Neely
86460c7568
Fix ptask.c callback arguments - remove PMEM_SUBSYS_OTHER from s->free calls
2026-03-08 19:22:20 +01:00
Levi Neely
b839a9a6a9
Fix ptask.c compilation errors - replace s->pmem_free with s->free
2026-03-08 19:20:08 +01:00
Levi Neely
6efaac5370
Add pmem.h include to 10 files missing it
2026-03-08 19:17:52 +01:00
Levi Neely
709e6d7fe9
Add pmem.h include to pdbg.c
2026-03-08 19:15:48 +01:00
Levi Neely
4fb8078978
Fix pcache.c compilation errors - replace he->pmem_free with pmem_free
2026-03-08 19:13:42 +01:00
Levi Neely
bc36713350
Migrate papi.c, ptools.c, pbusinessaccount.c to PMEM_SUBSYS_API
2026-03-08 19:11:04 +01:00
Levi Neely
7d10cf8d6c
Migrate remaining 34 files to pmem_malloc/pmem_free
2026-03-08 19:08:22 +01:00
Levi Neely
70dbe0104c
Fix panic() infinite recursion by unregistering handlers before abort()
2026-03-08 18:57:16 +01:00
Levi Neely
a53b09362f
Register panic handlers early in main()
2026-03-08 18:38:14 +01:00
Levi Neely
bf1d1caf2f
Add panic() with backtrace to psignal module
2026-03-08 18:25:57 +01:00
Levi Neely
b0f071ef23
Fix multiplication pattern in psock.c with overflow checks
2026-03-08 18:06:47 +01:00
Levi Neely
9f8f25183e
Migrate psock.c malloc/free to pmem_malloc/pmem_free
2026-03-08 18:03:03 +01:00
Levi Neely
3f17f6333d
Migrate pupload.c malloc/free to pmem_malloc/pmem_free
2026-03-08 17:53:56 +01:00
Levi Neely
9113a17ca8
Migrate pcrypto.c malloc/free to pmem_malloc/pmem_free
2026-03-08 17:52:03 +01:00
Levi Neely
66faf0e7cd
Migrate pdiff.c malloc/free to pmem_malloc/pmem_free
2026-03-08 17:45:10 +01:00
Levi Neely
95d02868af
Migrate pfsupload.c malloc/free to pmem_malloc/pmem_free
2026-03-08 17:40:25 +01:00
Levi Neely
655e14a485
Fix multiplication patterns in putil.c encoding functions with overflow checks
2026-03-08 17:30:52 +01:00
Levi Neely
b74f5f2049
Migrate putil.c malloc/free to pmem_malloc/pmem_free
2026-03-08 17:26:36 +01:00
Levi Neely
827722724a
Migrate psql.c malloc/free to pmem_malloc/pmem_free
2026-03-08 17:21:37 +01:00
Levi Neely
7cebfd6e58
Migrate plocalscan.c malloc/free to pmem_malloc/pmem_free
2026-03-08 17:16:58 +01:00
Levi Neely
3b5e34cfd6
Migrate publiclinks.c malloc/free to pmem_malloc/pmem_free
2026-03-08 17:12:25 +01:00
Levi Neely
37497aace2
Fix multiplication patterns in pfolder.c with overflow checks
2026-03-08 17:08:22 +01:00
Levi Neely
f2c1ee615f
Migrate pfolder.c malloc/free to pmem_malloc/pmem_free
2026-03-08 17:04:39 +01:00
Levi Neely
115cbba660
Migrate pcryptofolder.c malloc/free to pmem_malloc/pmem_free
2026-03-08 17:00:52 +01:00
Levi Neely
0ca4b25821
Migrate pssl.c malloc/free to pmem_malloc/pmem_free
2026-03-08 16:38:41 +01:00
Levi Neely
f578c80a50
Fix remaining multiplication pattern in ppagecache.c line 3239
2026-03-08 16:33:48 +01:00
Levi Neely
e495309ae3
Migrate ppagecache.c malloc/free to pmem_malloc/pmem_free
2026-03-08 16:30:54 +01:00
Levi Neely
0fcee5cd75
Fix multiplication patterns in pnetlibs.c with pmem_malloc_array
2026-03-08 16:25:42 +01:00
Levi Neely
84c8d2a0ee
Migrate pnetlibs.c malloc/free to pmem_malloc/pmem_free
2026-03-08 16:22:44 +01:00
Levi Neely
fd19b075ae
Migrate pfstasks.c malloc/free to pmem_malloc/pmem_free
2026-03-08 16:17:12 +01:00
Levi Neely
3f7f9d716c
Add overflow-safe pmem_malloc_array function
2026-03-08 16:04:20 +01:00
Levi Neely
964a5fcde9
Migrate malloc/calloc to pmem_malloc with subsystem tracking
2026-03-08 15:55:33 +01:00
Levi Neely
fc44baab8b
Implement memory accounting infrastructure
2026-03-08 15:45:26 +01:00
Levi Neely
8276034f70
Add lock ordering assertions in debug builds ( #370 )
...
* Add lock ordering assertions for psql_lock → file mutex
* Add missing psql.h include to pfs.h
* Fix debug build conditional compilation for lock ordering assertions
* Fix function declaration order for pfs_debug_check_lock_order
---------
Co-authored-by: Levi Neely <lkn@darkstar.example.net>
2026-03-08 15:38:41 +01:00
Levi Neely
d0c213f181
Add overflow-safe allocation wrapper pmem_calloc_safe() ( #369 )
...
* Add overflow-safe allocation wrappers to pmem module
* Replace malloc(nmemb*size) with pmem_calloc_safe in high-risk sites
---------
Co-authored-by: Levi Neely <lkn@darkstar.example.net>
2026-03-08 14:55:21 +01:00
Levi Neely
89ef8663b0
Add psignal module for centralized signal handling ( #368 )
...
* Add psignal module for centralized signal handling
- Added pclsync/psignal.h with psignal_register() and psignal_check_pending() API
- Added pclsync/psignal.c with async-signal-safe handlers for SIGINT, SIGTERM, SIGHUP
- Implements flag-based deferred signal handling pattern
* Integrate psignal into main loop and remove conflicting handlers
- Added extern "C" linkage to psignal.h for C++ compatibility
- Integrated psignal_check_pending() into pclsync_lib.cpp main loop
- Integrated psignal_check_pending() into ptimer.c timer loop
- Removed conflicting signal handlers from pfs.c
* Migrate psync_set_signal to psignal module
- Added psignal_set_custom_handler() to psignal.h and psignal.c
- Replaced psync_set_signal() calls in pfs.c with psignal_set_custom_handler()
- Centralizes all signal handling in psignal module
---------
Co-authored-by: Levi Neely <lkn@darkstar.example.net>
2026-03-08 14:27:21 +01:00
Levi Neely
9d4143f1f0
Add clang-tidy signal safety checks (pcl-2s2.2) ( #367 )
...
Co-authored-by: Levi Neely <lkn@darkstar.example.net>
2026-03-08 13:41:51 +01:00
Levi Neely
5ad532b692
Add NULL check audit to high-risk allocations ( #366 )
...
Co-authored-by: Levi Neely <lkn@darkstar.example.net>
2026-03-08 13:11:41 +01:00