mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-06 09:29:38 +01:00
8327986: ASAN reports use-after-free in DirectivesParserTest.empty_object_vm
Reviewed-by: rrich
Backport-of: 47f33a59ea
This commit is contained in:
committed by
Sergey Shelomentsev
parent
4df9a1636e
commit
fd8706d9e9
@@ -31,15 +31,16 @@
|
||||
|
||||
class DirectivesParserTest : public ::testing::Test{
|
||||
protected:
|
||||
const char* const _locale;
|
||||
char* const _locale;
|
||||
ResourceMark rm;
|
||||
stringStream stream;
|
||||
// These tests require the "C" locale to correctly parse decimal values
|
||||
DirectivesParserTest() : _locale(setlocale(LC_NUMERIC, NULL)) {
|
||||
DirectivesParserTest() : _locale(os::strdup(setlocale(LC_NUMERIC, nullptr), mtTest)) {
|
||||
setlocale(LC_NUMERIC, "C");
|
||||
}
|
||||
~DirectivesParserTest() {
|
||||
setlocale(LC_NUMERIC, _locale);
|
||||
os::free(_locale);
|
||||
}
|
||||
|
||||
void test_negative(const char* text) {
|
||||
|
||||
Reference in New Issue
Block a user