AmendHub

jcs

/

subtext

/

amendments

Amendments on August 3, 2022

uthread: Pre-allocate threads, put gaps between each stack

Add a verification function that verifies that each gap hasn't been
written to.
jcs made amendment 236 over 2 years ago

session: Fix some memory leaks

jcs made amendment 235 over 2 years ago

mail: Fix a memory leak, pass malloc notes to bile

jcs made amendment 234 over 2 years ago

folder: Fix some memory leaks, pass malloc notes to bile

jcs made amendment 233 over 2 years ago

board: Fix some memory leaks, pass malloc notes to bile

jcs made amendment 232 over 2 years ago

user: Rename user_find_username to user_username

This function isn't looking up something from bile that needs to be
freed, it's just checking its cache.
jcs made amendment 231 over 2 years ago

sysop: Pass malloc notes to bile

jcs made amendment 230 over 2 years ago

db: Better malloc notes

jcs made amendment 229 over 2 years ago

bile: Better malloc notes

jcs made amendment 228 over 2 years ago

util: Support malloc map compaction by toggling a variable

jcs made amendment 227 over 2 years ago

Amendments on July 31, 2022

*: Add malloc annotations

jcs made amendment 226 over 2 years ago

bile: Pass object size to bile_unmarshall_object to check for overflow

Also add malloc annotations
jcs made amendment 225 over 2 years ago

util: Add note parameter to xmalloc, xcalloc, and xrealloc

If THINK C supported __func__ this would be much easier, but for now
we have to manually annotate every allocation. This will help find
the source of memory leaks.
jcs made amendment 224 over 2 years ago

Amendments on July 29, 2022

settings: Fix bogus free

jcs made amendment 223 over 2 years ago

Amendments on July 24, 2022

tcp: Don't bother manually zeroing open options

This whole struct has already been zeroed with memset.
jcs made amendment 222 over 2 years ago

Amendments on July 21, 2022

*: Use NewPtr instead of malloc, add malloc and free debugging

Instead of free(ptr), use xfree(&ptr) and after it calls
DisposePtr(ptr), it will update ptr to point at NULL to catch
use-after-frees.
When MALLOC_DEBUG is defined, each allocation is added to a
list, and removed when freed. If it's not in the list at free
time, it's a double-free. Also, instead of pointing pointers at
NULL, point them to a pre-defined block of zeroes and in the
idle loop, periodically check that this block is still zero. This
will also catch use-after-frees in a more reliable (but costly)
way.
jcs made amendment 220 over 2 years ago

Amendments on July 19, 2022

*: Add session signoff view, remove session_output_template

All remaining uses of session_output_template can use session_printf
which still does {{B}} and {{/B}} parsing.
Change session_output_view to session_output_view_or_printf to make it
easier to print a view and fallback to a string, rather than having to
check the result of session_output_view everywhere.
jcs made amendment 218 over 2 years ago

bile: Fix unmarshalling of a dynamic field with zero length

Don't xmalloc(0), just set it to a NULL pointer.
jcs made amendment 217 over 2 years ago