pthread: Bump minimum stack size to fix cubeb crash.

This commit is contained in:
squidbus 2024-12-26 17:41:31 -08:00
parent a7f8aae2be
commit a4ef7771df
4 changed files with 4 additions and 4 deletions

1
.gitmodules vendored
View File

@ -122,3 +122,4 @@
[submodule "externals/cubeb"]
path = externals/cubeb
url = https://github.com/mozilla/cubeb
shallow = true

View File

@ -137,7 +137,6 @@ private:
};
CubebAudioOut::CubebAudioOut() {
cubeb_set_log_callback(CUBEB_LOG_DISABLED, nullptr);
if (const auto ret = cubeb_init(&ctx, "shadPS4", nullptr); ret != CUBEB_OK) {
LOG_CRITICAL(Lib_AudioOut, "Failed to create cubeb context: {}", ret);
}

View File

@ -244,8 +244,8 @@ int PS4_SYSV_ABI posix_pthread_create_name_np(PthreadT* thread, const PthreadAtt
new_thread->tid = ++TidCounter;
if (new_thread->attr.stackaddr_attr == 0) {
/* Enforce minimum stack size of 64 KB */
static constexpr size_t MinimumStack = 64_KB;
/* Enforce minimum stack size of 128 KB */
static constexpr size_t MinimumStack = 128_KB;
auto& stacksize = new_thread->attr.stacksize_attr;
stacksize = std::max(stacksize, MinimumStack);
}

View File

@ -321,7 +321,7 @@ void Emulator::LoadSystemModules(const std::filesystem::path& file, std::string
LOG_INFO(Loader, "No HLE available for {} module", module_name);
}
}
if (std::filesystem::exists(sys_module_path / game_serial)) {
if (!game_serial.empty() && std::filesystem::exists(sys_module_path / game_serial)) {
for (const auto& entry :
std::filesystem::directory_iterator(sys_module_path / game_serial)) {
LOG_INFO(Loader, "Loading {} from game serial file {}", entry.path().string(),