mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-05 08:52:36 +00:00
pthread: Bump minimum stack size to fix cubeb crash.
This commit is contained in:
parent
a7f8aae2be
commit
a4ef7771df
1
.gitmodules
vendored
1
.gitmodules
vendored
@ -122,3 +122,4 @@
|
|||||||
[submodule "externals/cubeb"]
|
[submodule "externals/cubeb"]
|
||||||
path = externals/cubeb
|
path = externals/cubeb
|
||||||
url = https://github.com/mozilla/cubeb
|
url = https://github.com/mozilla/cubeb
|
||||||
|
shallow = true
|
||||||
|
@ -137,7 +137,6 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
CubebAudioOut::CubebAudioOut() {
|
CubebAudioOut::CubebAudioOut() {
|
||||||
cubeb_set_log_callback(CUBEB_LOG_DISABLED, nullptr);
|
|
||||||
if (const auto ret = cubeb_init(&ctx, "shadPS4", nullptr); ret != CUBEB_OK) {
|
if (const auto ret = cubeb_init(&ctx, "shadPS4", nullptr); ret != CUBEB_OK) {
|
||||||
LOG_CRITICAL(Lib_AudioOut, "Failed to create cubeb context: {}", ret);
|
LOG_CRITICAL(Lib_AudioOut, "Failed to create cubeb context: {}", ret);
|
||||||
}
|
}
|
||||||
|
@ -244,8 +244,8 @@ int PS4_SYSV_ABI posix_pthread_create_name_np(PthreadT* thread, const PthreadAtt
|
|||||||
new_thread->tid = ++TidCounter;
|
new_thread->tid = ++TidCounter;
|
||||||
|
|
||||||
if (new_thread->attr.stackaddr_attr == 0) {
|
if (new_thread->attr.stackaddr_attr == 0) {
|
||||||
/* Enforce minimum stack size of 64 KB */
|
/* Enforce minimum stack size of 128 KB */
|
||||||
static constexpr size_t MinimumStack = 64_KB;
|
static constexpr size_t MinimumStack = 128_KB;
|
||||||
auto& stacksize = new_thread->attr.stacksize_attr;
|
auto& stacksize = new_thread->attr.stacksize_attr;
|
||||||
stacksize = std::max(stacksize, MinimumStack);
|
stacksize = std::max(stacksize, MinimumStack);
|
||||||
}
|
}
|
||||||
|
@ -321,7 +321,7 @@ void Emulator::LoadSystemModules(const std::filesystem::path& file, std::string
|
|||||||
LOG_INFO(Loader, "No HLE available for {} module", module_name);
|
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 :
|
for (const auto& entry :
|
||||||
std::filesystem::directory_iterator(sys_module_path / game_serial)) {
|
std::filesystem::directory_iterator(sys_module_path / game_serial)) {
|
||||||
LOG_INFO(Loader, "Loading {} from game serial file {}", entry.path().string(),
|
LOG_INFO(Loader, "Loading {} from game serial file {}", entry.path().string(),
|
||||||
|
Loading…
Reference in New Issue
Block a user