Handle jemalloc calls after TSD teardown

This only changes behavior for the tsd_generic path, where
pthread_getspecific() can report no TSD after the pthread key destructor
has finished.  Other TSD backends keep tsd_teardown_done() as a constant
false, so the added checks compile out there.

Avoid recreating TSD for late deallocations.  Preserve existing
reincarnation behavior for late allocations and nonzero reallocations.

Add Linux CI coverage for force_tls=0, with and without --enable-debug,
to exercise the Android-equivalent generic TSD path.
This commit is contained in:
Slobodan Predolac 2026-06-11 17:45:02 -07:00
parent 82e379b8f2
commit fb5499aa9c
11 changed files with 432 additions and 8 deletions

View file

@ -27,12 +27,12 @@ The script can generate workflows for different platforms:
### Linux CI (`linux-ci.yml`)
- **test-linux** (AMD64): `ubuntu-latest` (x86_64)
- ~96 configurations covering GCC, Clang, various flags
- ~98 configurations covering GCC, Clang, various flags
- **test-linux-arm64** (ARM64): `ubuntu-24.04-arm` (aarch64)
- ~14 configurations including large hugepage tests
- **Note:** Free ARM64 runners (Public Preview) - may have longer queue times during peak hours
**Total:** 110 configurations
**Total:** 112 configurations
### macOS CI (`macos-ci.yml`)
- **test-macos** (Intel): `macos-15-intel` (x86_64)
@ -161,7 +161,7 @@ The Windows workflow uses:
### Linux Build Process
- Ubuntu Latest for AMD64, Ubuntu 24.04 for ARM64
- Installs 32-bit cross-compilation dependencies when needed
- Most comprehensive test matrix (110 configurations)
- Most comprehensive test matrix (112 configurations)
## Relationship to Travis CI
@ -178,4 +178,3 @@ To regenerate all workflows after modifying `gen_gh_actions.py`:
```
**Note**: The generated files should not be edited by hand. All changes should be made to `gen_gh_actions.py` and then regenerated.

View file

@ -273,6 +273,18 @@ def generate_linux_job(arch):
'CXX': 'g++',
'CONFIGURE_FLAGS': '--enable-debug --enable-experimental-smallocx --enable-stats --enable-prof',
'EXTRA_CFLAGS': '-Werror -Wno-array-bounds'
},
{
'CC': 'gcc',
'CXX': 'g++',
'CONFIGURE_FLAGS': 'force_tls=0',
'EXTRA_CFLAGS': '-Werror -Wno-array-bounds'
},
{
'CC': 'gcc',
'CXX': 'g++',
'CONFIGURE_FLAGS': 'force_tls=0 --enable-debug',
'EXTRA_CFLAGS': '-Werror -Wno-array-bounds'
}
]