You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code can cause stack overflows on Linux with both clang/gcc when printing to stdout from inside a plugin (for debugging purposes)
std::u16string printf (const char8* format, ...)
{
using VST3::StringConvert::convert;
char8 string[1024 * 4]; // <<<<<< offending line
va_list marker;
va_start (marker, format);
vsnprintf (string, kPrintfBufferSize, format, marker);
return convert (string).data ();
}
Fix:
std::u16string printf (const char8* format, ...)
{
using VST3::StringConvert::convert;
std::string string;
string.reserve(1024 * 4);
va_list marker;
va_start (marker, format);
vsnprintf (&string[0], kPrintfBufferSize, format, marker);
returnconvert (string).data ();
}
In /testsuite/busconsistency
randIndex = rand () % (numBusses);
this generates a number between 0 and RAND_MAX when numBusses == 1. I get that there should be at least one event and one audio bus so this shouldn't be an issue, but when testing other issues it came up.
The text was updated successfully, but these errors were encountered:
The following code can cause stack overflows on Linux with both clang/gcc when printing to stdout from inside a plugin (for debugging purposes)
Fix:
In /testsuite/busconsistency
this generates a number between
0
andRAND_MAX
whennumBusses == 1
. I get that there should be at least one event and one audio bus so this shouldn't be an issue, but when testing other issues it came up.The text was updated successfully, but these errors were encountered: